Skip to content

Instantly share code, notes, and snippets.

@braibant
Created February 2, 2015 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braibant/827b3b2158f94f461847 to your computer and use it in GitHub Desktop.
Save braibant/827b3b2158f94f461847 to your computer and use it in GitHub Desktop.
unsigned long C_Initialize_wrapped(struct CK_C_INITIALIZE_ARGS* x1)
{
enum { nargs = 1 };
CAMLparam0();
CAMLlocalN(locals, nargs);
locals[0] = CTYPES_FROM_PTR(x1);
value x2 = functions[fn_C_Initialize];
value x3 = caml_callbackN(x2, nargs, locals);
unsigned long x4 = ctypes_ulong_val(x3);
CAMLreturnT(unsigned long, x4);
}
unsigned long C_Initialize(struct CK_C_INITIALIZE_ARGS* x11)
{
caml_c_thread_register();
caml_acquire_runtime_system();
value x16 = C_Initialize_wrapped(x11);
caml_release_runtime_system();
caml_c_thread_unregister();
return(x16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment