From 791e9d15abba835457b308121668a0ce75386a03 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 30 Sep 2004 20:20:26 +0000 Subject: [PATCH] 0.8.15.3: Well, as one-line patches go, that was pretty bad. Fix the (SIGNED-BYTE N) streams problem, and additionally fix (SIMPLE-STRING) as a type specifier for sequence creators. --- NEWS | 1 + src/code/fd-stream.lisp | 2 +- src/code/seq.lisp | 5 +++-- tests/seq.pure.lisp | 12 ++++++++++++ version.lisp-expr | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 3c9c848..3182fb6 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ changes in sbcl-0.8.16 relative to sbcl-0.8.15: * fixed some bugs revealed by Paul Dietz' test suite: ** POSITION on displaced vectors with non-zero displacement returns the right answer. + ** (SIGNED-BYTE) is a valid type specifier for sequence creators. changes in sbcl-0.8.15 relative to sbcl-0.8.14: * incompatible change: SB-INT:*BEFORE-SAVE-INITIALIZATIONS* and diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 122c3a4..7530128 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -671,7 +671,7 @@ do (setf result (+ (* 256 result) (sap-ref-8 sap (+ head j)))) - finally (return (if (logbitp result (1- i)) + finally (return (if (logbitp (1- i) result) (dpb result (byte i 0) -1) result)))))) `(signed-byte ,i) diff --git a/src/code/seq.lisp b/src/code/seq.lisp index ed0ff84..50eec6b 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -275,8 +275,9 @@ (cons (cond ((eq (car type) 'string) `(vector character ,@(cdr type))) ((eq (car type) 'simple-string) - `(simple-array character ,@(when (cdr type) - (list (cdr type))))) + `(simple-array character ,(if (cdr type) + (cdr type) + '(*)))) (t type))) (t type))) (type (specifier-type adjusted-type))) diff --git a/tests/seq.pure.lisp b/tests/seq.pure.lisp index 2217ee4..e59ab96 100644 --- a/tests/seq.pure.lisp +++ b/tests/seq.pure.lisp @@ -175,3 +175,15 @@ (let* ((x #(1 2 3)) (y (make-array 2 :displaced-to x :displaced-index-offset 1))) (assert (= (position 2 y) 0)))) + +;;; (SIMPLE-STRING) is a legal type specifier for creation functions +(let ((a (make-sequence '(simple-string) 5)) + (b (concatenate '(simple-string) "a" "bdec")) + (c (map '(simple-string) 'identity "abcde")) + (d (merge '(simple-string) "acd" "be" 'char>)) + (e (coerce '(#\a #\b #\c #\e #\d) '(simple-string)))) + (assert (= (length a) 5)) + (assert (string= b "abdec")) + (assert (string= c "abcde")) + (assert (string= d "beacd")) + (assert (string= e "abced"))) diff --git a/version.lisp-expr b/version.lisp-expr index 187ee53..d1efd9b 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.15.2" +"0.8.15.3" -- 1.7.10.4