[Ecls-list] UFFI to come in CVS

Juan Jose Garcia Ripoll jlr at mpq.mpg.de
Mon Mar 29 04:31:13 UTC 2004

Dear all,

I have just checked in some new files that implement the Unified Foreign
Functions Interface (UFFI, http://www.cliki.net/uffi) for ECL. This is
just the result of four hours of coding, after coming from a party with
one litre of bavarian beer in the stomach, so there will be bugs, but
since it is not used anywhere in ECL it should also not interfere with
the build process (i.e. no need for branching).

The ECL implementation of UFFI (located in the package FFI) is based on

* A new type of object that holds foreign pointers with a lisp tag (or
name). These objects are of type SI:FOREIGN (lisp) or t_foreign (C/C++).

* A slight modification of the C-INLINE routine, which includes two new
types of types (to be used in the arguments types and return type of the
special form). These new types are :cstring and :pointer-void. The first
one converts to and from lisp strings to null terminated strings. The
second one converts to and from foreign objects. When finished, it
should be possible to write things like

    (c-inline (a-string) (:cstring) :void "printf(#0)" :one-liner t)

I also modified c-inline so that the default value of the :side-effects
option is true (T).



More information about the ecl-devel mailing list