0.8.10.54:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 25 May 2004 15:29:00 +0000 (15:29 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 25 May 2004 15:29:00 +0000 (15:29 +0000)
Fix *PRINT-RADIX* T *PRINT-PRETTY* NIL array printing, spotted
by PFD ansi-tests.

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

diff --git a/NEWS b/NEWS
index e8f809e..1762350 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2488,6 +2488,8 @@ changes in sbcl-0.8.11 relative to sbcl-0.8.10:
        returning a known number of arguments greater than 63.
     ** fixed handling of invalid NIL arguments in keyword position
        in local calls.
+    ** fixed non-pretty printing of arrays with *PRINT-RADIX* being
+       true.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 81a08ea..3556649 100644 (file)
             (not (array-readably-printable-p array)))
     (error 'print-not-readable :object array))
   (write-char #\# stream)
-  (let ((*print-base* 10))
+  (let ((*print-base* 10)
+       (*print-radix* nil))
     (output-integer (array-rank array) stream))
   (write-char #\A stream)
   (with-array-data ((data array) (start) (end))
index bbaf4cb..9a3a2c3 100644 (file)
                     (multiple-value-list (integer-decode-float x2)))
              (string/= (prin1-to-string x1) (prin1-to-string x2)))))
 
+;;; readable printing of arrays with *print-radix* t
+(let ((*print-radix* t) 
+      (*print-readably* t)
+      (*print-pretty* nil))
+  (let ((output (with-output-to-string (s)
+                 (write #2a((t t) (nil nil)) :stream s))))
+    (assert (equalp (read-from-string output) #2a((t t) (nil nil))))))
+
 ;;; success
 (quit :unix-status 104)
index 71a4269..6996167 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.10.53"
+"0.8.10.54"