* Respect printer-control variables when printing readably.
* Print non-null weakness when printing unreadably.
* enhancement: implement SB-POSIX:MKTEMP and SB-POSIX:MKDTEMP.
* SB-DEBUG:PRINT-FRAME-CALL now prints the entry-point kind even
when SB-DEBUG:*SHOW-ENTRY-POINT-DETAILS* is NIL.
+ * unreadably printed representation of hash-tables now includes
+ weakness if any.
+ * bug fix: readably printing hash-tables now respects other printer
+ control variables.
* bug fix: compiler gave a bogus STYLE-WARNING for the :SYNCHRONIZED
keyword with MAKE-HASH-TABLE.
* bug fix: export SB-POSIX:MKSTEMP.
(cond ((or (not *print-readably*) (not *read-eval*))
(print-unreadable-object (hash-table stream :type t :identity t)
(format stream
- ":TEST ~S :COUNT ~S"
+ ":TEST ~S :COUNT ~S~@[ :WEAKNESS ~S~]"
(hash-table-test hash-table)
- (hash-table-count hash-table))))
+ (hash-table-count hash-table)
+ (hash-table-weakness hash-table))))
(t
- (with-standard-io-syntax
- (format stream
- "#.~W"
- `(%stuff-hash-table (make-hash-table ,@(%hash-table-ctor-args
+ (write-string "#." stream)
+ (write `(%stuff-hash-table (make-hash-table ,@(%hash-table-ctor-args
hash-table))
- ',(%hash-table-alist hash-table)))))))
+ ',(%hash-table-alist hash-table))
+ :stream stream))))
(def!method make-load-form ((hash-table hash-table) &optional environment)
(declare (ignore environment))
;;; This used to trigger an AVER instead.
(assert (raises-error? (format t "~>") sb-format:format-error))
+;;; readably printing hash-tables, check for circularity
+(let ((x (cons 1 2))
+ (h (make-hash-table))
+ (*print-readably* t)
+ (*print-circle* t)
+ (*read-eval* t))
+ (setf (gethash x h) h)
+ (destructuring-bind (x2 . h2) (read-from-string (write-to-string (cons x h)))
+ (assert (equal x x2))
+ (assert (eq h2 (gethash x2 h2)))))
+
;;; success
;;; 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.14.22"
+"1.0.14.23"