[ocaml-ctypes] Passing Caml function to C
ssp.mryau at gmail.com
Thu Dec 28 14:39:52 GMT 2017
Yes, that's right.
2017-12-28 19:15 GMT+05:00 john skaller <skaller at internode.on.net>:
> > On 29 Dec. 2017, at 00:59, Serge Sivkov <ssp.mryau at gmail.com> wrote:
> > An one of simplest methods will be to use
> > Callback.register name callback_func
> > on OCaml side and to use something like:
> > closure_f = caml_named_value(name);
> > ml_reply = caml_callback(*closure_f, ml_arg);
> > on C side.
> So the user supplied name is used to associate the code
> and data across the boundary?
> john skaller
> skaller at users.sourceforge.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ctypes