From 86d8cd085488ecfeeb25590c847230324147f564 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sun, 25 Nov 2007 08:45:19 -0500 Subject: [PATCH] Fixed a problem with hashtables where delete did not update the size of the table. --- scheme/ikarus.hash-tables.ss | 5 ++++- scheme/last-revision | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scheme/ikarus.hash-tables.ss b/scheme/ikarus.hash-tables.ss index 7b23d07..b8b3590 100644 --- a/scheme/ikarus.hash-tables.ss +++ b/scheme/ikarus.hash-tables.ss @@ -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) diff --git a/scheme/last-revision b/scheme/last-revision index eb8e831..3ff08f7 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1127 +1128