0.8.0.78.vector-nil-string.4:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 23 Jun 2003 12:32:52 +0000 (12:32 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 23 Jun 2003 12:32:52 +0000 (12:32 +0000)
Fix some brokennesses
... SXHASH now copes with (vector nil)s of non-zero length
... OUTPUT-SYMBOL can now output zero-length (vector nil)s

src/code/print.lisp
src/code/target-sxhash.lisp
version.lisp-expr

index 968c84f..68dffb6 100644 (file)
 ;;; words, diddle its case according to *PRINT-CASE* and
 ;;; READTABLE-CASE.
 (defun output-symbol-name (name stream &optional (maybe-quote t))
-  (declare (type simple-base-string name))
+  (declare (type simple-string name))
   (setup-printer-state)
   (if (and maybe-quote (symbol-quotep name))
       (output-quoted-symbol-name name stream)
index cc574a5..56df709 100644 (file)
   (declare (type index count))
   (let ((result 408967240))
     (declare (type fixnum result))
-    (dotimes (i count)
-      (declare (type index i))
-      (mixf result
-           (the fixnum
-                (ash (char-code (aref string i)) 5))))
+    (when (typep string 'base-string)
+      (dotimes (i count)
+       (declare (type index i))
+       (mixf result
+             (the fixnum
+               (ash (char-code (aref string i)) 5)))))
     result))
 ;;; test:
 ;;;   (let ((ht (make-hash-table :test 'equal)))
index 9ce03c6..058ac49 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.0.78.vector-nil-string.3"
+"0.8.0.78.vector-nil-string.4"