Hi,

I'm trying to pass a smalltalk string to a FFI wrapper method I've written,
the C function uses a macro "type" for the argument, but as far as I can
see is basically a char* type. I've tried using char* as the argument type
and it fails values to pass the string argument.

If I change the argument type to a void* it works sort of partially, it
passes additional memory values if I pass more than one argument to a
version of the function with multiple arguments. As I understand it FFI
should handle strings and coerce them to null terminated char* values when
char* is used as the argument type. Is there something I'm missing, not
understanding (very possible).

I had similar problems when passing integer values but fixed that by using
WordArray for the smalltalk type. Is there a similar fix for string
objects, or someway other way of null terminating the string ?

Thanks

Reply via email to