[cffi-devel] Re: cffi/allegro crash

Luís Oliveira luismbo at gmail.com
Sun Dec 18 16:17:23 UTC 2005


On 2005-dec-18, at 13:25, Surendra Singhi wrote:
> Is there any uniform way of passing C null value to functions?  
> Should I pass `0'?

Glad you were able to fix this issue! You should pass (cffi:null- 
pointer). CLISP does convert NIL to the null pointer which is  
unfortunate for this reason (Hi
Joerg!) :-) And it seems Lispworks does too.

The lack of uniformity is very unfortunate here. This needs to be  
fixed. We should either a) translate nil->null everywhere, b) don't  
translate nil->null anywhere or c) offer the two alternatives through  
two different types.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt




More information about the cffi-devel mailing list