[Haskell-cafe] Dealing with CStringLen

Maurí­cio briqueabraque at yahoo.com
Sat Nov 8 11:21:25 EST 2008


How is CStringLen supposed to be used? The only
usual C string I'm familiar with is the null
terminated sequence of chars. I remember some
Pascal version where the first 2 bytes were used
as an integer counting the following characters.
What is the convention used in Foreign.C.String?

I have a C function signature like this:

void function (int,const void*,int,const void*)

where each (int,const void*) pair is a string.
Can (should) I use CStringLen here? How?


More information about the Haskell-Cafe mailing list