diff options
Diffstat (limited to 'src/util/hash_table.c')
-rw-r--r-- | src/util/hash_table.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/hash_table.c b/src/util/hash_table.c index f8d5d0f88aa..7ee9e18a1fc 100644 --- a/src/util/hash_table.c +++ b/src/util/hash_table.c @@ -421,6 +421,15 @@ _mesa_hash_table_remove(struct hash_table *ht, } /** + * Removes the entry with the corresponding key, if exists. + */ +void _mesa_hash_table_remove_key(struct hash_table *ht, + const void *key) +{ + _mesa_hash_table_remove(ht, _mesa_hash_table_search(ht, key)); +} + +/** * This function is an iterator over the hash table. * * Pass in NULL for the first entry, as in the start of a for loop. Note that |