r11023: 2006-08-13 Kevin Rosenberg (kevin@rosenberg.net)
[uffi.git] / src / strings.lisp
index f41113ba416955665ddcb68617c905dca530b85e..0bdeeabe277a0338f6c37bd2439de584da76e39d 100644 (file)
@@ -389,19 +389,20 @@ that LW/CMU automatically converts strings from c-calls."
 
 (def-type char-ptr-def (* :unsigned-char))
 
-#+(or lispworks (and allegro (not ics)))
+#+(or (and allegro (not ics)) (and lispworks (not lispworks5)))
 (defun fast-native-to-string (s len)
   (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0))
           (type char-ptr-def s))
   (let* ((len (or len (strlen s)))
          (str (make-string len)))
     (declare (fixnum len)
-            (type (simple-array (signed-byte 8) (*)) str))
+            (type (simple-array #+lispworks base-char
+                                 #-lispworks (signed-byte 8) (*)) str))
     (dotimes (i len str)
       (setf (aref str i)
        (uffi:deref-array s '(:array :char) i)))))
 
-#+(and allegro ics)
+#+(or (and allegro ics) lispworks5)
 (defun fast-native-to-string (s len)
   (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0))
           (type char-ptr-def s))