21 Oct
2004
21 Oct
'04
4:53 p.m.
B) When passing char *string on C, should I use the CString or the Ptr CChar marhalling type from FFI ?
Ok. I see. Definition for CSTring is type CString = Ptr CChar C) CInt, CDouble are available...but, concerning Storable class. Given: typedef struct _foostruct { int a; double b; } fooStruct, *fooStructPtr; How to do to marshall it to Haskell ? type CFooStruct = ??? instance Storable CFooStruct where sizeOf _ = ??? peekElement _ = ???? -- Next is certainly OK, provided well defined CFooStruct type CFoosStructPtr = Ptr CFooStruct I need it to marshall the Maple kernel handle into Haskell...
_______________________________________________ FFI mailing list FFI@haskell.org http://www.haskell.org/mailman/listinfo/ffi