1.0.37.70: Fix PRINT-OBJECT for RANDOM-STATE
authorPaul Khuong <pvk@pvk.ca>
Mon, 26 Apr 2010 23:15:09 +0000 (23:15 +0000)
committerPaul Khuong <pvk@pvk.ca>
Mon, 26 Apr 2010 23:15:09 +0000 (23:15 +0000)
 * Discovered by Hans Hubner, reported by madnificient on #lisp.

NEWS
src/code/target-random.lisp
tests/print.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 0c99a05..c547ee3 100644 (file)
--- 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
index ca89d4b..2f7d1a6 100644 (file)
@@ -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
index 382483a..70f7872 100644 (file)
                      (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
index 8c91b92..747655b 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".)
-"1.0.37.69"
+"1.0.37.70"