[ocaml-ctypes] Passing Caml function to C

john skaller skaller at internode.on.net
Thu Dec 28 13:05:27 GMT 2017


There’s some machinery for this but .. well I am suspicious :)

How can this possibly work?

Caml functions are closures,  the only way you could pass
a closure would be to generate a thunk. I’m suspicious that
this doesn’t work in general. And you would need to find
a place to put the thunk which the OS allows you to execute.

—
john skaller
skaller at users.sourceforge.net
http://felix-lang.org



More information about the Ctypes mailing list