summaryrefslogtreecommitdiff
path: root/libiberty/hashtab.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2004-04-13 15:23:19 +0000
committerDJ Delorie <dj@delorie.com>2004-04-13 15:23:19 +0000
commite0a8313d710582858ed866adc56271f3ab64296a (patch)
treec9110ec762736508d8a0c3be20e4e71bc5e9f1b2 /libiberty/hashtab.c
parent83ec593983604b331f9b40e81c314046a0236089 (diff)
downloadgdb-e0a8313d710582858ed866adc56271f3ab64296a.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/hashtab.c')
-rw-r--r--libiberty/hashtab.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index f7751664f04..2639428df9c 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -600,17 +600,31 @@ htab_find_slot (htab, element, insert)
}
/* This function deletes an element with the given value from hash
+ table (the hash is computed from the element). If there is no matching
+ element in the hash table, this function does nothing. */
+
+void
+htab_remove_elt (htab, element)
+ htab_t htab;
+ PTR element;
+{
+ htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
+}
+
+
+/* This function deletes an element with the given value from hash
table. If there is no matching element in the hash table, this
function does nothing. */
void
-htab_remove_elt (htab, element)
+htab_remove_elt_with_hash (htab, element, hash)
htab_t htab;
PTR element;
+ hashval_t hash;
{
PTR *slot;
- slot = htab_find_slot (htab, element, NO_INSERT);
+ slot = htab_find_slot_with_hash (htab, element, hash, NO_INSERT);
if (*slot == EMPTY_ENTRY)
return;