From a6103aace1e40d0948aeb090f7b5d5ca77fc293a Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 1 Mar 2004 20:23:30 +0000 Subject: [PATCH] 0.8.8.7: 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 | 3 +++ src/code/array.lisp | 5 +++-- src/code/stream.lisp | 3 ++- src/compiler/fndb.lisp | 3 ++- version.lisp-expr | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 31d598389..42d501a78 100644 --- 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 diff --git a/src/code/array.lisp b/src/code/array.lisp index ed95b971a..71ce324fb 100644 --- a/src/code/array.lisp +++ b/src/code/array.lisp @@ -679,8 +679,9 @@ 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) diff --git a/src/code/stream.lisp b/src/code/stream.lisp index f436ab05d..73844a06d 100644 --- a/src/code/stream.lisp +++ b/src/code/stream.lisp @@ -1031,7 +1031,8 @@ (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 diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index e8b3b32e2..0d8fc9fac 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -918,7 +918,8 @@ (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)) diff --git a/version.lisp-expr b/version.lisp-expr index 38ac28a63..9872d8ff9 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 2.11.4.GIT