[ocaml-ctypes] Defines, and Structs with platform-specific fields

Trevor Smith trevorsummerssmith at gmail.com
Fri Oct 17 12:35:44 BST 2014


I am working on a ctypes binding to libuv [https://github.com/joyent/libuv],
and I have two questions:

1) Is the recommended way to interact with C-defines the way described in
this thread?

2) What is the recommended way to deal with struct fields that vary
depending upon platform?

Libuv is a cross platform library, and has platform-specific fields for its
structs. For example see the struct uv_loop_s.

Defined here https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv.h
Unix specific fields:
Windows specific fields:

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20141017/d31beee7/attachment.html>

More information about the Ctypes mailing list