Fixed a problem with hashtables where delete did not update the size
of the table.
This commit is contained in:
@@ -154,7 +154,10 @@
|
||||
|
||||
(define (del-hash h x)
|
||||
(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!
|
||||
(lambda (h x v)
|
||||
|
||||
@@ -1 +1 @@
|
||||
1127
|
||||
1128
|
||||
|
||||
Reference in New Issue
Block a user