X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=uffi%2Fclsql-uffi.lisp;h=7ac28c00e7f8c54418fde9f8459d5433e9557b4b;hb=c0f15eada06c0c53437a5b3acc72ab1cd3c72df1;hp=d901481dce0dbbe853e997cad73717e911b228c4;hpb=2d7fb2dcce0f94745672b4f2aff6be39d610a063;p=clsql.git diff --git a/uffi/clsql-uffi.lisp b/uffi/clsql-uffi.lisp index d901481..7ac28c0 100644 --- a/uffi/clsql-uffi.lisp +++ b/uffi/clsql-uffi.lisp @@ -75,7 +75,7 @@ (uffi:def-function "atol64" ((str (* :unsigned-char)) - (high32 (* :int))) + (high32 (* :unsigned-int))) :module "clsql-uffi" :returning :unsigned-int) @@ -113,9 +113,9 @@ ((:int32 :int) (atoi char-ptr)) (:int64 - (uffi:with-foreign-object (high32-ptr :int) + (uffi:with-foreign-object (high32-ptr :unsigned-int) (let ((low32 (atol64 char-ptr high32-ptr)) - (high32 (uffi:deref-pointer high32-ptr :int))) + (high32 (uffi:deref-pointer high32-ptr :unsigned-int))) (if (zerop high32) low32 (make-64-bit-integer high32 low32))))) @@ -124,6 +124,11 @@ (uffi:convert-from-foreign-usb8 char-ptr length) (error "Can't return blob since length is not specified."))) (t + ;; sb-unicode still broken with converting with length, assume + ;; that string is null terminated + #+sb-unicode + (uffi:convert-from-foreign-string char-ptr :locale :none) + #-sb-unicode (if length (uffi:convert-from-foreign-string char-ptr :locale :none :null-terminated-p nil