projects
/
uffi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9431: revert to previous handling arrays on sbcl/cmu
[uffi.git]
/
src
/
strings.lisp
diff --git
a/src/strings.lisp
b/src/strings.lisp
index 0f01e97ba1245103f0c8f8b5affaaa3f0ef019dc..f935e1bd479db0b479068a6e812432dbfebe44d9 100644
(file)
--- a/
src/strings.lisp
+++ b/
src/strings.lisp
@@
-157,10
+157,11
@@
that LW/CMU automatically converts strings from c-calls."
nil
(if (eq ,locale :none)
(fast-native-to-string ,obj ,length)
nil
(if (eq ,locale :none)
(fast-native-to-string ,obj ,length)
- (excl:native-to-string
- ,obj
- ,@(when length (list :length length))
- :truncate (not ,null-terminated-p))))
+ (values
+ (excl:native-to-string
+ ,obj
+ ,@(when length (list :length length))
+ :truncate (not ,null-terminated-p)))))
#+lispworks
`(if (fli:null-pointer-p ,obj)
nil
#+lispworks
`(if (fli:null-pointer-p ,obj)
nil
@@
-346,4
+347,4
@@
that LW/CMU automatically converts strings from c-calls."
(let* ((len (or len (strlen s)))
(str (make-string len)))
(dotimes (i len str)
(let* ((len (or len (strlen s)))
(str (make-string len)))
(dotimes (i len str)
- (setf (schar str i) (code-char (uffi:deref-array s '(:array :byte) i))))))
+ (setf (schar str i) (code-char (uffi:deref-array s '(:array :
unsigned-
byte) i))))))