Fwd: Re: [Ecls-list] cl_def_c_function()

Michael O'Connor moconnor59 at yahoo.com
Tue Mar 16 09:40:03 UTC 2004


That works, in that the called function returns values
correctly to the Lisp interpreter, but my called
function is not receiving any arguments from the Lisp
interpreter other that the context (closure) data.

Do I need to do something in the call to
cl_make_cclosure_va() to indicate the number of
arguments the callback function is expecting (similar
to the nargs argument to cl_def_c_function())?

Thanks,

Michael

--- worm <worm at arrakis.es> wrote:


> ATTACHMENT part 1 message/rfc822 
> From: worm <worm at arrakis.es>
> To: Michael O'Connor <moconnor59 at yahoo.com>
> Date: Thu, 11 Mar 2004 15:20:37 GMT
> Subject: Re: [Ecls-list] cl_def_c_function()
> 
> Remitente: Michael O'Connor <moconnor59 at yahoo.com>
> > Quick question (I hope): does ECL support the idea
> of
> > "client callback data"? By this I mean a C void
> > pointer (void *) or similar that can be used to
> store
> > / refer to context data in calls to the C/C++
> > application.
> 
> Not really. You can implement something similar
> using
> not def_c_function, but closures. However, right now
> the data associated to the closure should be wrapped
> in a lisp object. For an example, have a look at
> si_hash_table_iterator and si_hash_table_iterate.
> Basically, the idea is that the data of the closure
> is
> passed as a first argument to the called function.
> 
> Regards,
> 
> Juanjo
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com




More information about the ecl-devel mailing list