clsql/uffi clsql-uffi.lisp,1.23,1.24

"Kevin M. Rosenberg" <[email protected]> Sat, 17 May 2003 01:52:23 -0600
Newsgroups gmane.lisp.clsql.cvs
Message-ID <[email protected]>
Update of /pubcvs/clsql/uffi
In directory boa.b9.com:/tmp/cvs-serv26386/uffi

Modified Files:
	clsql-uffi.lisp 
Log Message:
Auto commit for Debian build

Index: clsql-uffi.lisp
===================================================================
RCS file: /pubcvs/clsql/uffi/clsql-uffi.lisp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** clsql-uffi.lisp	17 May 2003 07:50:55 -0000	1.23
--- clsql-uffi.lisp	17 May 2003 07:52:21 -0000	1.24
***************
*** 1,3 ****
! ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
  ;;;; *************************************************************************
  ;;;; FILE IDENTIFICATION
--- 1,3 ----
! l;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
  ;;;; *************************************************************************
  ;;;; FILE IDENTIFICATION
***************
*** 121,129 ****
  		  (make-64-bit-integer high32 low32)))))
  	 (t
! 	  ;; Choose optimized routine
! 	  #-(or cmu sbcl lispworks scl)
! 	  (native-to-string char-ptr)
! 	  #+(or cmu sbcl lispworks scl)
! 	  (uffi:convert-from-foreign-string char-ptr)))))))
    
  
--- 121,126 ----
  		  (make-64-bit-integer high32 low32)))))
  	 (t
! 	  #+allegro (native-to-string char-ptr) ;; optimized
! 	  #-allegro (uffi:convert-from-foreign-string char-ptr)))))))
    
  
***************
*** 131,150 ****
      ((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))
-   (let* ((len (strlen s))
- 	 (str (make-string len)))
-     (declare (fixnum len)
- 	     (simple-string str))
-     (do ((i 0))
- 	((= i len))
-       (declare (fixnum i))
-       (setf (schar str i)
- 	(code-char (uffi:deref-array s '(:array :unsigned-char) i)))
-       (incf i))
-     str))
  
  #+(and allegro ics)
--- 128,131 ----