[Ecls-list] load-foreign-library

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Tue Oct 24 22:07:06 UTC 2006


2006/10/24, Juan Jose Garcia-Ripoll <jjgarcia at users.sourceforge.net>:
> Other implementations
> wait until the statement in which the object is referenced, so that
> compiled files behave much like loaded files. This allows you to have
> the class definition for a standard object (in our case
> define-foreign-type) in the same file in which an instance of that
> object appears (in our case, in the macroexpansion of defcfun).

I think I have fixed this. The execution of load and initialization
forms for standard objects is now made as close to the first reference
as possible. With this I can run a simple example of CFFI on a AMD64
(another platform without DFFI).

I have committed this patch tonight.

Juanjo

;;;--------------test.lisp
(cffi:define-foreign-type pm-timestamp () ':double)

(cffi:load-foreign-library "/usr/lib/libm.so")

(cffi:defcfun ("sin" mysin) :double (when pm-timestamp) )
;;;eof




More information about the ecl-devel mailing list