1
/* File modwrap.c -- wrappers around the Caml functions */
7
#include <caml/mlvalues.h>
8
#include <caml/callback.h>
12
static value * fib_closure = NULL;
13
if (fib_closure == NULL) fib_closure = caml_named_value("fib");
14
return Int_val(callback(*fib_closure, Val_int(n)));
17
char * format_result(int n)
19
static value * format_result_closure = NULL;
20
if (format_result_closure == NULL)
21
format_result_closure = caml_named_value("format_result");
22
return strdup(String_val(callback(*format_result_closure, Val_int(n))));
23
/* We copy the C string returned by String_val to the C heap
24
so that it remains valid after garbage collection. */
27
BOOL APIENTRY DllMain(HANDLE module, DWORD reason, void *reserved)
32
case DLL_PROCESS_ATTACH:
b'\\ No newline at end of file'