Fix bug: weak-method:clean! removing entries whose key is #f.
authorChris Hanson <org/chris-hanson/cph>
Mon, 1 Feb 2010 07:12:02 +0000 (23:12 -0800)
committerChris Hanson <org/chris-hanson/cph>
Mon, 1 Feb 2010 07:12:02 +0000 (23:12 -0800)
src/runtime/hashtb.scm

index e5fe7f8969b9c4c6543047422bba0b68d35fb69b..6390433a9ab0b9ed0b4bce2e22d257110b5c3749 100644 (file)
@@ -317,7 +317,7 @@ USA.
            ((scan-head
              (lambda (p)
                (if (pair? p)
-                   (if (%weak-entry-key (car p))
+                   (if (%weak-entry-valid? (car p))
                        (begin
                          (vector-set! buckets i p)
                          (scan-tail (cdr p) p))
@@ -328,13 +328,13 @@ USA.
             (scan-tail
              (lambda (p q)
                (if (pair? p)
-                   (if (%weak-entry-key (car p))
+                   (if (%weak-entry-valid? (car p))
                        (scan-tail (cdr p) p)
                        (begin
                          (decrement-table-count! table)
                          (let loop ((p (cdr p)))
                            (if (pair? p)
-                               (if (%weak-entry-key (car p))
+                               (if (%weak-entry-valid? (car p))
                                    (begin
                                      (set-cdr! q p)
                                      (scan-tail (cdr p) p))