projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r10232: 26 Dec 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git]
/
uffi
/
clsql-uffi.lisp
diff --git
a/uffi/clsql-uffi.lisp
b/uffi/clsql-uffi.lisp
index d901481dce0dbbe853e997cad73717e911b228c4..7ac28c00e7f8c54418fde9f8459d5433e9557b4b 100644
(file)
--- a/
uffi/clsql-uffi.lisp
+++ b/
uffi/clsql-uffi.lisp
@@
-75,7
+75,7
@@
(uffi:def-function "atol64"
((str (* :unsigned-char))
(uffi:def-function "atol64"
((str (* :unsigned-char))
- (high32 (* :int)))
+ (high32 (* :
unsigned-
int)))
:module "clsql-uffi"
:returning :unsigned-int)
:module "clsql-uffi"
:returning :unsigned-int)
@@
-113,9
+113,9
@@
((:int32 :int)
(atoi char-ptr))
(:int64
((: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))
(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)))))
(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
(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
(if length
(uffi:convert-from-foreign-string char-ptr :locale :none
:null-terminated-p nil