Re: Converting [Word8] to CString

2001-09-15 Thread Ashley Yakeley
At 2001-09-15 02:15, Marcin 'Qrczak' Kowalczyk wrote: >Fri, 14 Sep 2001 23:40:42 -0700, Ashley Yakeley <[EMAIL PROTECTED]> pisze: > >> I'm looking for a function that will convert a [Word8] byte-array >> to a CString (i.e. a C byte array) for the purposes of FFI. > >You can use newArray which all

Re: Converting [Word8] to CString

2001-09-15 Thread Marcin 'Qrczak' Kowalczyk
Fri, 14 Sep 2001 23:40:42 -0700, Ashley Yakeley <[EMAIL PROTECTED]> pisze: > I'm looking for a function that will convert a [Word8] byte-array > to a CString (i.e. a C byte array) for the purposes of FFI. You can use newArray which allocates the C byte array using malloc so it must be freed by f

Converting [Word8] to CString

2001-09-14 Thread Ashley Yakeley
I'm looking for a function that will convert a [Word8] byte-array to a CString (i.e. a C byte array) for the purposes of FFI. foreign import "JVMBridge" "JVMBridge_FindClass" rawFindClass :: JavaVM -> CString -> IO JVMObjectRef; makeCString :: [Word8] -> IO CString; It has to w