;;;; Programmers: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
-;;;; $Id: clsql-uffi.lisp,v 1.20 2003/05/16 18:53:57 kevin Exp $
+;;;; $Id: clsql-uffi.lisp,v 1.22 2003/05/17 07:45:05 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(make-64-bit-integer high32 low32)))))
(t
;; Choose optimized routine
- #-(or cmu sbcl)
+ #-(or cmu sbcl scl)
(native-to-string char-ptr)
- #+(or cmu sbcl)
+ #+(or cmu sbcl scl)
(uffi:convert-from-foreign-string char-ptr)))))))
((str (* :unsigned-char)))
:returning :unsigned-int)
+#-allegro
(defun native-to-string (s)
(declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0))
(type char-ptr-def s))
((= i len))
(declare (fixnum i))
(setf (schar str i)
- (code-char (uffi:deref-array s '(:array :unsigned-char) i)))
+ (code-char (uffi:deref-array s :unsigned-char i)))
(incf i))
str))
((= i len))
(declare (fixnum i))
(setf (schar str i)
- (code-char (uffi:deref-array s '(:array :unsigned-char) i)))
+ (code-char (uffi:deref-array s :unsigned-char i)))
(incf i))
str))
((= i len4))
(declare (fixnum i))
(setf (aref (the (simple-array (signed-byte 32) (*)) str) i)
- (uffi:deref-array s '(:array :int) i))
+ (uffi:deref-array s :int i))
(incf i))
(do ((i (* 4 len4)))
((= i len))
(declare (fixnum i))
(setf (aref (the (simple-array (signed-byte 8) (*)) str) i)
- (uffi:deref-array s '(:array :unsigned-char) i))
+ (uffi:deref-array s :unsigned-char i))
(incf i))
str))