[Haskell] Finding pointer size

Rob Hoelz hoelz at wisc.edu
Fri Feb 16 00:56:58 EST 2007

I'm working with the Foreign module, and I need to allocate a pointer
to a pointer (in C, a char **).  The problem is, I don't know how to
find out the size of a char * in Haskell.  Here's the basic layout of
the code:

allocaBytes len $ \ array -> ... -- len is the size of the char ** to
be allocated times sizeof(char *).

Rob Hoelz

More information about the Haskell mailing list