From 75974d2be7cff6ab9ae547235f1510f44c75a9fa Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Mon, 26 Apr 2010 23:15:09 +0000 Subject: [PATCH] 1.0.37.70: Fix PRINT-OBJECT for RANDOM-STATE * Discovered by Hans Hubner, reported by madnificient on #lisp. --- NEWS | 1 + src/code/target-random.lisp | 2 +- tests/print.impure.lisp | 7 +++++++ version.lisp-expr | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0c99a05..c547ee3 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,7 @@ changes relative to sbcl-1.0.37: * bug fix: Maybe restore buildability on Alpha. * bug fix: READ-BYTE isn't inline anymore, fixing weird streams failures. (lp#569404) + * bug fix: RANDOM-STATE can be printed readably again. changes in sbcl-1.0.37 relative to sbcl-1.0.36: * enhancement: Backtrace from THROW to uncaught tag on x86oids now shows diff --git a/src/code/target-random.lisp b/src/code/target-random.lisp index ca89d4b..2f7d1a6 100644 --- a/src/code/target-random.lisp +++ b/src/code/target-random.lisp @@ -46,7 +46,7 @@ (format stream "#S(~S ~S #.~S)" 'random-state ':state - `(make-array (,(+ 3 mt19937-n)) + `(make-array ,(+ 3 mt19937-n) :element-type '(unsigned-byte 32) :initial-contents diff --git a/tests/print.impure.lisp b/tests/print.impure.lisp index 382483a..70f7872 100644 --- a/tests/print.impure.lisp +++ b/tests/print.impure.lisp @@ -472,4 +472,11 @@ (format nil "~A" (make-instance 'a-class-name))) :test #'char=))) +;;; The PRINT-OBJECT method for RANDOM-STATE used to have a bogus +;;; dimension argument for MAKE-ARRAY. +(with-test (:name :print-random-state) + (assert (equalp *random-state* + (read-from-string + (write-to-string *random-state*))))) + ;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 8c91b92..747655b 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".) -"1.0.37.69" +"1.0.37.70" -- 1.7.10.4