[cffi-devel] [PATCH] fix %load-foreign-library on cmucl

Stelian Ionescu stelian.ionescu-zeus at poste.it
Wed Dec 6 22:56:09 UTC 2006


on CMUCL it get an error when I load twice a library with
LOAD-FOREIGN-LIBRARY because SYS::LOAD-OBJECT-FILE returns NIL when
re-loading a shared object. the attached patch fixes this

-- 
(sign :name "Stelian Ionescu" :aka "fe[nl]ix"
      :quote "Quidquid latine dictum sit, altum sonatur.")
-------------- next part --------------
--- old-cffi/src/cffi-cmucl.lisp	2006-12-06 23:11:12.000000000 +0100
+++ new-cffi/src/cffi-cmucl.lisp	2006-12-06 23:11:12.000000000 +0100
@@ -341,7 +341,8 @@
 
 (defun %load-foreign-library (name)
   "Load the foreign library NAME."
-  (sys::load-object-file name))
+  (or (sys::load-object-file name)
+      t))
 
 ;;; XXX: doesn't work on Darwin; does not check for errors. I suppose we'd
 ;;; want something like SBCL's dlclose-or-lose in foreign-load.lisp:66

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20061206/e5b84514/attachment.sig>


More information about the cffi-devel mailing list