0.8.15.3:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 30 Sep 2004 20:20:26 +0000 (20:20 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 30 Sep 2004 20:20:26 +0000 (20:20 +0000)
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
src/code/fd-stream.lisp
src/code/seq.lisp
tests/seq.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 3c9c848..3182fb6 100644 (file)
--- 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
index 122c3a4..7530128 100644 (file)
                          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)
index ed0ff84..50eec6b 100644 (file)
            (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)))
index 2217ee4..e59ab96 100644 (file)
   (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")))
index 187ee53..d1efd9b 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.15.2"
+"0.8.15.3"