[squeak-dev] Send NULL to a C function trough FFI
Igor Stasenko
siguctua at gmail.com
Wed Sep 17 05:02:41 UTC 2008
2008/9/17 Mariano Martinez Peck <marianopeck at gmail.com>:
> Hi everybody!
>
> I need to call a C function with a NULL value in one of the parameter. I
> tried to send it a nil but I got an error in FFI when trying to call that
> function. The error is: "cannot coerce arguments". Obviously this error says
> FFI cannot map from nil to null.
>
> Do someone know how can I do this?
>
you mean C's NULL?
AFAIK it defined as
#define NULL 0
so, in squeak you can simply pass 0.
> many thanks,
>
> mariano
>
>
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|