From 71817ae02c1932e911a7e7c4e6bfc880bdbc8490 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 19 Feb 2003 19:54:32 +0000 Subject: [PATCH] 0.7.12.48: Pre-freeze fix inclusions ... merge patch from Tony Martinez for CONCATENATED-STREAM misbehaviour (sbcl-devel 2003-02-10) ... include test from sbcl-devel 2003-02-15 --- NEWS | 3 +++ src/code/stream.lisp | 2 +- tests/stream.pure.lisp | 7 +++++++ version.lisp-expr | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 3cd4890..82523b4 100644 --- a/NEWS +++ b/NEWS @@ -1557,6 +1557,9 @@ changes in sbcl-0.7.13 relative to sbcl-0.7.12: Furthermore, a compliance bug has been fixed: SLOT-MISSING is now always called when a slot is not present in an instance. (thanks to Gerd Moellmann) + * fixed a bug related to CONCATENATED-STREAMs: PEEK-CHAR will no + longer signal an error on unreading a character following EOF on + the previous constituent stream. (thanks to Tony Martinez) * fixed some bugs revealed by Paul Dietz' test suite: ** ARRAY-IN-BOUNDS-P now allows arbitrary integers as arguments, not just nonnegative fixnums; diff --git a/src/code/stream.lisp b/src/code/stream.lisp index c96d81d..06e95a7 100644 --- a/src/code/stream.lisp +++ b/src/code/stream.lisp @@ -904,7 +904,7 @@ (let* ((stream (car current)) (result (,fun stream nil nil))) (when result (return result))) - (setf (concatenated-stream-current stream) current))))) + (pop (concatenated-stream-current stream)))))) (in-fun concatenated-in read-char) (in-fun concatenated-bin read-byte)) diff --git a/tests/stream.pure.lisp b/tests/stream.pure.lisp index d1f52f8..2593683 100644 --- a/tests/stream.pure.lisp +++ b/tests/stream.pure.lisp @@ -73,3 +73,10 @@ (get-output-stream-string out-stream)) ;; (Before the fix, the LET* expression just signalled an error.) "a")) + +;; 0.7.12 doesn't advance current stream in concatenated streams +;; correctly when searching a stream for a char to read. +(with-input-from-string (p "") + (with-input-from-string (q "foo") + (let* ((r (make-concatenated-stream p q))) + (peek-char nil r)))) diff --git a/version.lisp-expr b/version.lisp-expr index ba2ee60..91d912e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.12.47" +"0.7.12.48" -- 1.7.10.4