ocaml-ctypes icon indicating copy to clipboard operation
ocaml-ctypes copied to clipboard

ocaml_{bytes,string} parameter for underlying type

Open dsheets opened this issue 10 years ago • 0 comments
trafficstars

Right now, there is no way to quietly use ocaml_bytes or ocaml_string in an API that expects UInt8 * or similar -- only char * is workable -- even if the types are actually compatible. This results in -Wpointer-sign warnings which gum up the compilation stage and mask actual issues.

One way to resolve this would be to allow ocaml_bytes and ocaml_string to take a parameter (optional?) of the underlying type they will translate to.

This is somewhat similar to #316.

dsheets avatar Nov 18 '15 14:11 dsheets