Surendra Singhi <[EMAIL PROTECTED]> writes:

> Surendra Singhi <[EMAIL PROTECTED]> writes:
>
>> Hello,
>>   Any allegro experts around? I wrote cffi bindings (Dec-15) for some 
>> functions in
>> wxWidgets, the bindings work smoothly on clisp and lispworks.
>>
>> But they crash on allegro. Then I tried to write the allego bindings 
>> directly,
>> but it still crashes.
>>
> OK, I debugged further and found out that my allegro bindings were incorrect
> which was causing segmentation faults, but cffi bindings still seem to be
> correct as they work on clisp and lispworks. 
>

After fixing the bindings it was still crashing, the reason for that was
because I was passing 'nil' as an argument to a function, thinking that
allegro will convert it to 'C' null value.

Unfortunately, allegro doesn't do so and this was causing the bindings to crash.
For precisely the same reason cffi bindings also crash for allegro but worked
for clisp, and lispworks because they convert nil to 'C' null value.

Is there any uniform way of passing C null value to functions? Should I pass 
`0'?

Thanks.

-- 
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html

,----
| "War is Peace! Freedom is Slavery! Ignorance is Strength!"
|     -- Orwell, 1984, 1948
`----

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to