Yes, now it works!�Thanks Igor.
For pointers, there is an options in callouts, #optCoerceNilToNullOn 20 April 2012 15:59, Jan van de Sandt <jvdsandt@gmail.com> wrote:
> Hello,
>
> I use NativeBoost to call some icu4c functions. This works fine most of the
> time. But now I run into the problem that when I pass nil as the argument
> value for one or more void* / char* parameters I get an error. When I pass a
> value or an empty ByteArray than it works.
>
> According to the icu4c documentation I should be able to pass NULL as an
> argument value.
>
> What am I missing?
>
which should be set,
then you can invoke the call with nil as argument, which will convert
it to C NULL.
By default this option is OFF, because extra check means extra cycles.
You can control a callout options by either per function call (see
NBBasicExamples>>readDoubleFrom:)
or for all methods of your class as a whole, like:
MyClass class>>ffiCalloutOptions
� � � �"by default, return all pointers as an instance of external address "
� � � �^ #(
� � � � � � � �+ optReturnPtrAsExternalAddress
� � � � � � � �+ optCoerceNilToNull �"passing nil as pointer, will convert it to null(0) "
� � � �)
> Jan.
--
Best regards,
Igor Stasenko.