[cffi-devel] [PATCH] *FOREIGN-LIBRARY-DIRECTORIES* ignored on CMUCL

Matthias Andreas Benkard mulk at gmx.net
Sun Feb 10 17:50:00 UTC 2008


Hi,

It seems to me that LOAD-FOREIGN-LIBRARY-PATH expects
%LOAD-FOREIGN-LIBRARY to signal an error upon failure to load a
library.  On my Debian system's CMUCL, it does not do so, causing
LOAD-FOREIGN-LIBRARY to fail to load any libraries that have to be
searched for in the *FOREIGN-LIBRARY-DIRECTORIES*.

The patch below makes LOAD-FOREIGN-LIBRARY work for me.  Please tell
me whether my needing this patch means I'm doing something wrong. :)

--- old-cffi/src/cffi-cmucl.lisp        2008-02-10 18:36:33.000000000 +0100
+++ new-cffi/src/cffi-cmucl.lisp        2008-02-10 18:36:34.000000000 +0100
@@ -357,7 +357,7 @@
       (sys::load-object-file path)
     (cond
       ;; Loading failed.
-      ((stringp message) nil)
+      ((stringp message) (error "~A" message))
       ;; The library was already loaded.
       ((null ret) (cdr (rassoc path sys::*global-table* :test #'string=)))
       ;; The library has been loaded, but since SYS::LOAD-OBJECT-FILE

Regards,
Matthias



More information about the cffi-devel mailing list