[ocaml-ctypes] Passing Caml function to C

Serge Sivkov ssp.mryau at gmail.com
Thu Dec 28 14:39:52 GMT 2017


Yes, that's right.

WBR, ssp

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
> http://felix-lang.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20171228/386c502c/attachment.html>


More information about the Ctypes mailing list