ocaml-ctypes
ocaml-ctypes copied to clipboard
ocaml_{bytes,string} parameter for underlying type
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.