[MLton] Representation of strings in the FFI

Stephen Weeks MLton@mlton.org
Tue, 26 Apr 2005 21:16:26 -0700


> Does this mean that it isn't possible to determine the length
> of an exported string at the C level?

It is quite possible.  The exported string is both a char* and a
pointer to a MLton array, from which one can extract the length using
GC_arrayNumElements.