From d25878a6a15d78719a44ba21534b24a11e03628f Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 18 Sep 2005 04:51:48 +0000 Subject: [PATCH] r10752: 2005-09-17 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.5.2 * src/objects.lisp: prepend _ character for entry point on macosx as noted by Luis Oliveira --- ChangeLog | 5 +++++ debian/changelog | 6 ++++++ src/objects.lisp | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc3ea9a..3d6fd1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-17 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.2 + * src/objects.lisp: prepend _ character for entry + point on macosx as noted by Luis Oliveira + 2005-07-05 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.5.0 * Remove vestigial LLGPL license notices as UFFI as been diff --git a/debian/changelog b/debian/changelog index 68dfc3a..87943b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-uffi (1.5.2-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Sat, 17 Sep 2005 22:48:11 -0600 + cl-uffi (1.5.1-1) unstable; urgency=low * New upstream diff --git a/src/objects.lisp b/src/objects.lisp index cc4a9fe..46b7275 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -242,6 +242,11 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." '(error "WITH-CAST-POINTER not (yet) implemented for ~A" (lisp-implementation-type))) + (defmacro convert-external-name (name) + "Add an underscore to NAME if necessary for the ABI." + #+macosx `(concatenate 'string "_" ,name) + #-macosx name) + (defmacro def-foreign-var (names type module) #-lispworks (declare (ignore module)) (let ((foreign-name (if (atom names) names (first names))) @@ -255,7 +260,7 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." #+allegro `(define-symbol-macro ,lisp-name (ff:fslot-value-typed (quote ,(convert-from-uffi-type type :deref)) - :c (ff:get-entry-point ,foreign-name))) + :c (convert-external-name (ff:get-entry-point ,foreign-name)))) #+lispworks `(progn (fli:define-foreign-variable (,lisp-name ,foreign-name) -- 2.34.1