[ocaml-ctypes] Abstract 'a typ
Thomas Braibant
thomas.braibant at gmail.com
Tue Mar 10 12:10:00 GMT 2015
On Mon, Mar 9, 2015 at 10:37 PM, Daniel Bünzli
<daniel.buenzli at erratique.ch> wrote:
> If your bindings are thin you should just use an OCaml abstract type that denotes pointers to void pointers. The only place where you need to be careful is in the bindings themselves but that should be trivial.
>
> For example in tsdl:
>
> https://github.com/dbuenzli/tsdl/blob/bc18d14b1a28af99ebc30b61e303ee5304055d31/src/tsdl.mli#L727
> https://github.com/dbuenzli/tsdl/blob/bc18d14b1a28af99ebc30b61e303ee5304055d31/src/tsdl.ml#L1093-L1095
>
Thanks. This is what I had in mind with void pointers. I will go
forward with that solution. (And refrain myself from trying to be
pedantic inside these particular bindings.)
Best,
Thomas
More information about the Ctypes
mailing list