clsql/uffi clsql-uffi.lisp,1.29,1.30
"Kevin M. Rosenberg" <[email protected]> Sun, 8 Jun 2003 06:48:57 -0600
| Newsgroups | gmane.lisp.clsql.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /pubcvs/clsql/uffi
In directory boa.b9.com:/tmp/cvs-serv10175/uffi
Modified Files:
clsql-uffi.lisp
Log Message:
Index: clsql-uffi.lisp
===================================================================
RCS file: /pubcvs/clsql/uffi/clsql-uffi.lisp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** clsql-uffi.lisp 6 Jun 2003 21:59:09 -0000 1.29
--- clsql-uffi.lisp 8 Jun 2003 12:48:55 -0000 1.30
***************
*** 22,59 ****
(defun canonicalize-type-list (types auto-list)
"Ensure a field type list meets expectations"
! (let ((length-types (length types))
! (new-types '()))
! (loop for i from 0 below (length auto-list)
! do
! (if (>= i length-types)
! (push t new-types) ;; types is shorted than num-fields
! (push
! (case (nth i types)
! (:int
! (case (nth i auto-list)
! (:int32
! :int32)
! (:int64
! :int64)
! (t
! t)))
! (:double
! (case (nth i auto-list)
! (:double
! :double)
! (t
! t)))
! (:int32
! (if (eq :int32 (nth i auto-list))
! :int32
! t))
! (:int64
! (if (eq :int64 (nth i auto-list))
! :int64
! t))
! (t
! t))
! new-types)))
! (nreverse new-types)))
(uffi:def-function "atoi"
--- 22,62 ----
(defun canonicalize-type-list (types auto-list)
"Ensure a field type list meets expectations"
! (declaim (optimize (speed 3) (safety 0)))
! (do ((i 0 (1+ i))
! (new-types '())
! (length-types (length types))
! (length-auto-list (length auto-list)))
! ((= i length-auto-list)
! (nreverse new-types))
! (declaim (fixnum length-types length-auto-list i))
! (if (>= i length-types)
! (push t new-types) ;; types is shorted than num-fields
! (push
! (case (nth i types)
! (:int
! (case (nth i auto-list)
! (:int32
! :int32)
! (:int64
! :int64)
! (t
! t)))
! (:double
! (case (nth i auto-list)
! (:double
! :double)
! (t
! t)))
! (:int32
! (if (eq :int32 (nth i auto-list))
! :int32
! t))
! (:int64
! (if (eq :int64 (nth i auto-list))
! :int64
! t))
! (t
! t))
! new-types))))
(uffi:def-function "atoi"
***************
*** 78,82 ****
(defmacro make-64-bit-integer (high32 low32)
! `(+ ,low32 (* ,high32 +2^32+)))
(defmacro split-64-bit-integer (int64)
--- 81,85 ----
(defmacro make-64-bit-integer (high32 low32)
! `(+ ,low32 (ash ,high32 32)))
(defmacro split-64-bit-integer (int64)
***************
*** 94,97 ****
--- 97,101 ----
(defun convert-raw-field (char-ptr types index)
+ (declare (optimize (speed 3) (safety 0) (space 0)))
(let ((type (if (listp types)
(nth index types)