summaryrefslogtreecommitdiff
path: root/ghc/rts/Hash.c
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-06-28 13:43:41 +0000
committersimonmar <unknown>2005-06-28 13:43:41 +0000
commit9e9dfae098e44961adef0713fcfe29855c982a84 (patch)
treea09eba4dd143e15adc82519b1e4a7f13fc6c6549 /ghc/rts/Hash.c
parenta9ae952e647887c0108080ca48426cb35bdd8400 (diff)
downloadhaskell-9e9dfae098e44961adef0713fcfe29855c982a84.tar.gz
[project @ 2005-06-28 13:43:41 by simonmar]
Disable the assertion that checks for multiple entries with the same key in the hash table. It's useful to be able to do this sometimes.
Diffstat (limited to 'ghc/rts/Hash.c')
-rw-r--r--ghc/rts/Hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ghc/rts/Hash.c b/ghc/rts/Hash.c
index d3e4cf47e9..ada11a6a85 100644
--- a/ghc/rts/Hash.c
+++ b/ghc/rts/Hash.c
@@ -245,8 +245,9 @@ insertHashTable(HashTable *table, StgWord key, void *data)
int index;
HashList *hl;
- /* We want no duplicates */
- ASSERT(lookupHashTable(table, key) == NULL);
+ // Disable this assert; sometimes it's useful to be able to
+ // overwrite entries in the hash table.
+ // ASSERT(lookupHashTable(table, key) == NULL);
/* When the average load gets too high, we expand the table */
if (++table->kcount >= HLOAD * table->bcount)