From 13635ed2b774e454b90823e085d84aa968da9eb4 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 22 Feb 2005 17:12:01 +0000 Subject: [PATCH] r10344: 2005-02-22 Kevin Rosenberg (kevin@rosenberg.net) * src/primitives.lisp, src/strings.lisp: Better support for sb-unicode [from Yoshinori Tahara and R. Mattes] --- ChangeLog | 4 ++++ debian/changelog | 6 ++++++ src/primitives.lisp | 3 ++- src/strings.lisp | 5 +++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8d7c69..46eba70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-02-22 Kevin Rosenberg (kevin@rosenberg.net) + * src/primitives.lisp, src/strings.lisp: Better support + for sb-unicode [from Yoshinori Tahara and R. Mattes] + 2005-01-22 Kevin Rosenberg (kevin@rosenberg.net) * src/primitives.lisp: Better support SBCL-AMD64 diff --git a/debian/changelog b/debian/changelog index 14ec424..e6750de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-uffi (1.4.32-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Tue, 22 Feb 2005 10:10:03 -0700 + cl-uffi (1.4.31-1) unstable; urgency=low * New upstream diff --git a/src/primitives.lisp b/src/primitives.lisp index 0878026..5522f5a 100644 --- a/src/primitives.lisp +++ b/src/primitives.lisp @@ -147,7 +147,8 @@ supports takes advantage of this optimization." (setq *type-conversion-list* '((* . *) (:void . sb-alien:void) (:pointer-void . (* t)) - (:cstring . sb-alien:c-string) + #-sb-unicode(:cstring . sb-alien:c-string) + #+sb-unicode(:cstring . sb-alien:utf8-string) (:char . sb-alien:char) (:unsigned-char . (sb-alien:unsigned 8)) (:byte . (sb-alien:signed 8)) diff --git a/src/strings.lisp b/src/strings.lisp index b8965b1..d911427 100644 --- a/src/strings.lisp +++ b/src/strings.lisp @@ -329,8 +329,9 @@ that LW/CMU automatically converts strings from c-calls." (declare (optimize (speed 3) (safety 0))) (cond (null-terminated-p - (let ((casted (sb-alien:cast - (sb-alien:sap-alien sap (* char)) sb-alien:c-string))) + (let ((casted (sb-alien:cast (sb-alien:sap-alien sap (* char)) + #+sb-unicode sb-alien:utf8-string + #-sb-unicode sb-alien:c-string))) (if length (copy-seq (subseq casted 0 length)) (copy-seq casted)))) -- 2.34.1