[ocaml-ctypes] Structs with malloc allocated fields

Travis Brady travis.brady at gmail.com
Tue Dec 17 04:46:15 GMT 2013


I'm wrapping a simple library that contains a few functions that call
malloc or realloc internally to allocate a few struct members and I'm
wondering how to make those behave with Ctypes and the GC.

The library exposes structname_free functions where applicable, but I'm not
certain how to tell Ctypes how to use them or if I even need to at all.

I've read through the ctypes examples, tests and other code from onanomsg
and ocaml-libnl to no avail.

Anyone mind sharing any tips here?

thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20131216/2b828c42/attachment.html>


More information about the Ctypes mailing list