Sha256: 7a1f8ba7b39b388c64baa9f4015ff55423963884991d59cdf7b466ec57e27c66
Contents?: true
Size: 712 Bytes
Versions: 3
Compression:
Stored size: 712 Bytes
Contents
#include <stdio.h> #include <stdlib.h> #include <ruby.h> int loaded = 0; VALUE Exports = Qnil; extern void hs_init(int * argc, char ** argv[]); void safe_hs_init() { char ** argv = malloc(sizeof(char**) * 1); int argc = 1; argv[0]="haskell_extension"; if (! loaded) { loaded=1; // printf("really loading haskell runtime\n"); hs_init(&argc, &argv); } } void Init_stub() { // don't do anything, we just want to make // sure that the other objects can see the // safe_hs_init symbols at the C level // so, ok. we do do some stuff here.:) but it's really two separate things. VALUE Hubris = rb_define_module("Hubris"); Exports = rb_define_module_under(Hubris, "Exports"); }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hubris-0.0.6 | ext/stub/stub.c |
hubris-0.0.5 | ext/stub/stub.c |
hubris-0.0.4 | ext/stub/stub.c |