[Openmcl-cvs-notifications] r10871 - /trunk/source/level-0/l0-hash.lisp

gb at clozure.com gb at clozure.com
Thu Sep 25 06:00:31 EDT 2008


Author: gb
Date: Thu Sep 25 06:00:31 2008
New Revision: 10871

Log:
When hashing physical pathnames, ignore the version slot (if EQUAL
doesn't compare versions, two EQUAL pathnames whose versions differ
should hash to the same value.)

Modified:
    trunk/source/level-0/l0-hash.lisp

Modified: trunk/source/level-0/l0-hash.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-0/l0-hash.lisp (original)
+++ trunk/source/level-0/l0-hash.lisp Thu Sep 25 06:00:31 2008
@@ -1742,10 +1742,16 @@
   (if (> counter 0)
     (typecase expr
       ((or string bit-vector number character)  (+ key (%%equalhash expr)))
-      ((or pathname logical-pathname)
+      (logical-pathname
        (dotimes (i (uvsize expr) key)
          (declare (fixnum i))
          (setq key (+ key (sxhash-aux (%svref expr i) (1- counter) key)))))
+      (pathname
+       ;; Don't consider %PHYSICAL-PATHNAME-VERSION to be significant
+       (dotimes (i (uvsize expr) key)
+         (declare (fixnum i))
+         (unless (=3D i %physical-pathname-version)
+           (setq key (+ key (sxhash-aux (%svref expr i) (1- counter) key))=
))))
       (symbol (+ key (%%equalhash (symbol-name expr))))
       (cons (sxhash-aux
              (cdr expr)



More information about the Openmcl-cvs-notifications mailing list