[cffi-devel] Re: Clisp, cffi and defcfuns in a saved image

Luís Oliveira luismbo at gmail.com
Mon Feb 12 03:56:17 UTC 2007


Olá,

On 12/02/07, Edgar Gonçalves <edgar.goncalves at gmail.com> wrote:
> 1) Unlike AllegroCL or Lispworks, Clisp (and SBCL too, btw) requires me to
> precede all defcfuns related to a library with:
>
> #+clisp (cffi::use-foreign-library Tcl)
> (defcfun ("Tcl_FindExecutable" tcl-find-executable) :void
>   (argv0 :string))

That doesn't sound right. You should only need to call
(use-foreign-library tcl) only once, some time before you load your
bindings.


> 2) When I load the saved image (using the code from above), I get an error
> when applying defcfun'ed functions, telling me the library wasn't found:

Just tested with GNU CLISP 2.41 (2006-10-13) on OSX. Loaded cffi-test,
saved an image (tried with ":executable t" too), restarted with the
image, and ran (rt:do-tests) and it works. (Except some funcall.*
tests fail at first, for some reason. I blame it on some RT
weirdness.)

AFAICT, CLISP correctly reloads the libraries at startup. Can you try
this with cffi-test or otherwise provide some sort of test case?

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list