I started with a new image and loaded�ConfigurationOfNativeBoost. But it's still not working.

First I do a call to get a handle:

"UEnumeration* ucal_openTimeZones(UErrorCode * ec)"

self nbCall: #( void* ucal_openTimeZones_48( ICUErrorCodeNB* anErrorCode ) ) module:�'libicui18n.dylib'

This call succeeds. I store the result in a subclass of�NBExternalHandle using the #value: class method.

In the second call I want to use the handle to retrieve the next element:

self nbCall: #( char* uenum_next_48(ICUEnumerationNB* aHandle, int* nil, ICUErrorCodeNB* anErrorCode ) ) module:�'libicuuc.dylib'

But this call still causes the image to disappear. I think the nil and errorCode arguments are all right. Is there something wrong with the first argument?

Jan.





On Tue, Feb 14, 2012 at 11:34 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 13 February 2012 22:40, Jan van de Sandt <jvdsandt@gmail.com> wrote:
> Hello list,
>
> I want to call the following C function using NativeBoost:
>
> const char* uenum_next(UEnumeration * en, int32_t * resultLength, UErrorCode
> * status)
>
> According to the (icu4c) documentation you can pass NULL for the resultLenth
> argument [1]. But when I try:
>
> self nbCall: #( char* uenum_next_48( self, nil, ICUErrorCodeNB* anErrorCode
> ) ) module: 'libicuuc.dylib'

should be no problem.
you can try also to just pass zero, if it make any difference

�self nbCall: #( char* uenum_next_48( self, 0 , ICUErrorCodeNB*
anErrorCode ) ) module: 'libicuuc.dylib'

(in fact code generator should produce same code, since nil
substituted by 0 at the end).

Maybe the problem is not there, but in other arguments you passing.

And, i recommend you to use ConfigurationOfNativeBoost from
NBInstaller, but not latest packages directly, since Javier put a lot
of changes lately and some parts might not work properly.


>
> My image craches. Does anyone know what I'm doing wrong?
>
> Jan.
>
> [1]�http://icu-project.org/apiref/icu4c/uenum_8h.html#a99298eabaa3874cdfd9793b207848f68



--
Best regards,
Igor Stasenko.