From: Kevin M. Rosenberg Date: Fri, 18 Jul 2003 21:34:18 +0000 (+0000) Subject: r5326: *** empty log message *** X-Git-Tag: v1.6.1~198 X-Git-Url: http://git.kpe.io/?p=uffi.git;a=commitdiff_plain;h=50a15877e932e758f0eaacdf9383abf0e3c7c2bb r5326: *** empty log message *** --- diff --git a/src/strings.lisp b/src/strings.lisp index b5eeebe..a8cbf8b 100644 --- a/src/strings.lisp +++ b/src/strings.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: strings.lisp,v 1.9 2003/06/12 18:32:30 kevin Exp $ +;;;; $Id: strings.lisp,v 1.10 2003/07/18 21:33:26 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -310,8 +310,7 @@ that LW/CMU automatically converts strings from c-calls." (def-type char-ptr-def (* :unsigned-char)) -;;#+(or lispworks (and allegro ics)) -#+(or lispworks allegro) +#+(or lispworks (and allegro (not ics))) (defun fast-native-to-string (s) (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0)) (type char-ptr-def s)) @@ -322,7 +321,17 @@ that LW/CMU automatically converts strings from c-calls." (dotimes (i len str) (setf (aref str i) (uffi:deref-array s '(:array :char) i))))) -;;#+(and allegro (not ics)) +#+(and allegro ics) +(defun fast-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)) + (dotimes (i len str) + (setf (schar str i) (ensure-char-character + (uffi:deref-array s '(:array :char) i)))))) + #+ignore (defun fast-native-to-string (s) (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0) (debug 0)) diff --git a/uffi.asd b/uffi.asd index 53db664..dbdb11c 100644 --- a/uffi.asd +++ b/uffi.asd @@ -7,7 +7,7 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: uffi.asd,v 1.26 2003/06/07 22:34:24 kevin Exp $ +;;;; $Id: uffi.asd,v 1.27 2003/07/18 21:33:25 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -35,8 +35,8 @@ ((:file "package") (:file "primitives" :depends-on ("package")) #+mcl (:file "readmacros-mcl" :depends-on ("package")) - (:file "strings" :depends-on ("primitives" "functions" "aggregates")) (:file "objects" :depends-on ("primitives")) + (:file "strings" :depends-on ("primitives" "functions" "aggregates" "objects")) (:file "aggregates" :depends-on ("primitives")) (:file "functions" :depends-on ("primitives")) (:file "libraries" :depends-on ("package"))