[Ecls-list] Announcement: RDNZL - a .NET bridge for CL

Juan Jose Garcia Ripoll lisp at arrakis.es
Thu Dec 16 05:08:01 UTC 2004


Edi Weitz wrote:

>>I would like to add some sort of standard interface to ECL for doing
>>that, because on of the trickiest thing of this business is to
>>ensure that the data which is passed to the C world is not garbage
>>collected.
>>    
>>
>Unless I'm missing something that problem must be solved without
>callbacks as well.  Even with "normal" C calls you want to be able to
>allocate C data from Lisp and don't have it gc'ed while the C side
>works with it.  Native threads are another issue but I don't think ECL
>deals with them yet.
>  
>
Well, in normal FFIs you explicitely destroy objects that you pass to 
the C world. I was not sure whether the same rule is expected to work 
with callbacks.

As for passing a single C function, that can be a little bit more 
difficult, as one would really need to create specific C functions which 
are only intended for act as callbacks, as opposed to having a general 
callback function with some additional data that can dispatch depending 
on the data. The last option is for instance what the Boehm-Weiser 
garbage collector uses for many purposes.

Regards,

Juanjo




More information about the ecl-devel mailing list