Fixed a problem with hashtables where delete did not update the size

of the table.
This commit is contained in:
Abdulaziz Ghuloum 2007-11-25 08:45:19 -05:00
parent a1adb6cc14
commit 86d8cd0854
2 changed files with 5 additions and 2 deletions

View File

@ -154,7 +154,10 @@
(define (del-hash h x) (define (del-hash h x)
(cond (cond
[(get-bucket h x) => (lambda (b) (unlink! h b))])) [(get-bucket h x) =>
(lambda (b)
(unlink! h b)
(set-hasht-count! h (- (hasht-count h) 1)))]))
(define put-hash! (define put-hash!
(lambda (h x v) (lambda (h x v)

View File

@ -1 +1 @@
1127 1128