From 09464c82191ef241c749756bbad5ffaadd8f6e5f Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 8 Jun 2005 21:25:43 +0000 Subject: [PATCH] r10584: * tests/objects.lisp: Rename from pointers.lisp. Fix test CHPTR.4 as noted by Joerg Hoehle * src/objects.lisp: Remove default from ensure-char-integer --- ChangeLog | 6 ++++++ src/objects.lisp | 3 +-- tests/pointers.lisp | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a473121..8e59a17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ 2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) + * tests/objects.lisp: Rename from pointers.lisp. + Fix test CHPTR.4 as noted by Joerg Hoehle + * src/objects.lisp: Remove default from ensure-char-integer + +2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.4.38 * src/libraries.lisp: Commit patch from Edi Weitz to allow plain filename library names to allow underlying lisp implementation to find foreign libraries in the diff --git a/src/objects.lisp b/src/objects.lisp index 7648e93..e9a2024 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -137,8 +137,7 @@ 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 - `(if (characterp ,obj) (char-code ,obj) ,obj)) + #+(or allegro cmu sbcl scl openmcl) obj) (defmacro ensure-char-storable (obj) #+(or lispworks (and mcl (not openmcl))) obj diff --git a/tests/pointers.lisp b/tests/pointers.lisp index 64391b9..cebb359 100644 --- a/tests/pointers.lisp +++ b/tests/pointers.lisp @@ -39,8 +39,9 @@ (deftest :chptr.4 (let ((native-string "test string")) (uffi:with-foreign-string (fs native-string) - (numberp - (deref-pointer fs :byte)))) + (integerp + (ensure-char-integer + (deref-pointer fs :unsigned-char))))) t) (deftest :chptr.5 -- 2.34.1