X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fstrings.lisp;h=c63d943e2c8e3496fb89056de87df03bb722bab1;hb=f99aed37f09c0d37e3859c1130fd2dc73f125d8c;hp=f935e1bd479db0b479068a6e812432dbfebe44d9;hpb=38bdd9ccd063be4b3e0658a880a705ccb0cfdeb1;p=uffi.git diff --git a/src/strings.lisp b/src/strings.lisp index f935e1b..c63d943 100644 --- a/src/strings.lisp +++ b/src/strings.lisp @@ -190,8 +190,9 @@ that LW/CMU automatically converts strings from c-calls." `(if (ccl:%null-ptr-p ,obj) nil #+(and mcl (not openmcl)) (ccl:%get-cstring ,obj 0 ,@(if length (list length) nil)) - #+openmcl (let ((str (ccl:%get-cstring ,obj))) - ,(if length '(subseq str 0 length) 'str))) + #+openmcl ,@(if length + `((ccl:%str-from-ptr ,obj ,length)) + `((ccl:%get-cstring ,obj)))) )