0.8.8.7:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 1 Mar 2004 20:23:30 +0000 (20:23 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 1 Mar 2004 20:23:30 +0000 (20:23 +0000)
MAKE-STRING-INPUT-STREAM fixes
... :END can be NIL;
... coerce non-(simple-array character (*))s to that type.
Also fix an erroneous test and message in ADJUST-ARRAY.

NEWS
src/code/array.lisp
src/code/stream.lisp
src/compiler/fndb.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 31d5983..42d501a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2323,6 +2323,9 @@ changes in sbcl-0.8.9 relative to sbcl-0.8.8:
     ** ADJUST-ARRAY now copies the datum in a zero rank array if
        required.
     ** ADJUST-ARRAY no longer adjusts non-adjustable arrays.
+    ** MAKE-STRING-INPUT-STREAM accepts NIL as a value for :END.
+    ** MAKE-STRING-INPUT-STREAM functions correctly for strings with
+       element-type NIL.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index ed95b97..71ce324 100644 (file)
                  element-type)))
     (let ((array-rank (length (the list dimensions))))
       (declare (fixnum array-rank))
-      (when (and fill-pointer (> array-rank 1))
-       (error "Multidimensional arrays can't have fill pointers."))
+      (unless (= array-rank 1)
+       (when fill-pointer
+         (error "Only vectors can have fill pointers.")))
       (cond (initial-contents-p
             ;; array former contents replaced by INITIAL-CONTENTS
             (if (or initial-element-p displaced-to)
index f436ab0..73844a0 100644 (file)
   (declare (type string string)
           (type index start)
           (type (or index null) end))
-  (let ((end (%check-vector-sequence-bounds string start end)))
+  (let* ((string (coerce string '(simple-array character (*))))
+        (end (%check-vector-sequence-bounds string start end)))
     (with-array-data ((string string) (start start) (end end))
       (internal-make-string-input-stream
        string ;; now simple
index e8b3b32..0d8fc9f 100644 (file)
 (defknown make-concatenated-stream (&rest stream) stream (unsafely-flushable))
 (defknown make-two-way-stream (stream stream) stream (unsafely-flushable))
 (defknown make-echo-stream (stream stream) stream (flushable))
-(defknown make-string-input-stream (string &optional index index) stream
+(defknown make-string-input-stream (string &optional index sequence-end)
+  stream
   (flushable unsafe))
 (defknown make-string-output-stream 
     (&key (:element-type type-specifier)) 
index 38ac28a..9872d8f 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.8.6"
+"0.8.8.7"