Building an OCaml list of string from C

It should not be a problem. I think to remember that in recent compilers to access unsigned char you need to use Bytes_val instead of String_val but I cannot remember if there was any subtlety on how to return them to ocaml, have a look at the “Interfacing with C” section of the OCaml manual (I am on mobile, I don’t have it at hand rigth now)