[Ecls-list] updating refererence pointers in UFFI

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Sep 4 09:00:34 UTC 2006

2006/9/4, Goffioul Michael <goffioul at imec.be>:
> As already answered, you can achieve that by allocating foreign objects
> yourself in LISP and passing them as argument to your C function. For
> instance, when allocating a foreign object of type :int in ECL, it would
> be passed as int* to a C function.
> However, it would be much easier if ECL could do it automatically. I'm
> thinking about CLISP here, where you can tag FFI arguments as in, out
> or in-out.
> [...]
> What do you think?

This is not only a CLISP feature, SBCL and CMUCL also have it. This
should be done at the level of the c-inline special form. It will
indeed complicate the special form a little, given the fact that
c-inline already supports multiple values as output type.

I am worried however at messing up with the UFFI interface, but that
can probably be fixed with a warning message and a global flag that
disables it. As a side note, if you look at all the FFI interfaces out
there, not even CFFI provide this, probably because some commercial
lisps do not support in/out and out arguments.



Max-Planck-Institut für Quantenoptik
Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
Phone: +49 89 32905 345   Fax: +49 89 32905 336

More information about the ecl-devel mailing list