From: Kevin M. Rosenberg Date: Wed, 8 Jun 2005 22:36:29 +0000 (+0000) Subject: r10588: better support for lispworks variance on derefing X-Git-Tag: v1.6.1~47 X-Git-Url: http://git.kpe.io/?p=uffi.git;a=commitdiff_plain;h=bbe3653207a655c6fc596474e75092fd0affd0bd r10588: better support for lispworks variance on derefing --- diff --git a/ChangeLog b/ChangeLog index 8e59a17..7440425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) * tests/objects.lisp: Rename from pointers.lisp. - Fix test CHPTR.4 as noted by Joerg Hoehle + Fix test CHPTR.4 as noted by Jorg Hohle * src/objects.lisp: Remove default from ensure-char-integer 2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) @@ -9,10 +9,9 @@ allow plain filename library names to allow underlying lisp implementation to find foreign libraries in the locations known to the operating system. - * tests/cast.lisp: Add :module keyword as noted by - Joerg Hoehle. + * tests/cast.lisp: Add :module keyword as noted by Jorg Hohle. * src/strings.lisp: Avoid multiple evaluation of input - parameters for macros as noted by Joerg Hoele. + parameters for macros as noted by Jorg Hohle. 2005-04-12 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.4.37 diff --git a/src/objects.lisp b/src/objects.lisp index e9a2024..cdd3882 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -137,7 +137,11 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." (defmacro ensure-char-integer (obj) #+(or (and mcl (not openmcl))) `(char-code ,obj) - #+(or allegro cmu sbcl scl openmcl) obj) + #+(or allegro cmu sbcl scl openmcl) obj + #+lispworks + ;; lispworks varies whether deref'ing array vs. slot access of a char + #+lispworks + `(if (integerp ,obj) ,obj (char-code ,obj))) (defmacro ensure-char-storable (obj) #+(or lispworks (and mcl (not openmcl))) obj diff --git a/tests/time.lisp b/tests/time.lisp index 25a876f..89382a8 100644 --- a/tests/time.lisp +++ b/tests/time.lisp @@ -36,7 +36,7 @@ (uffi:def-function "gmtime" ((time (* time-t))) - :returning (* tm)) + :returning (:struct-pointer tm)) (uffi:def-function "asctime" ((time (:struct-pointer tm)))