;;;; 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
;;;;
(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))
(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))
;;;; 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
;;;;
((: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"))