summaryrefslogtreecommitdiffstats
path: root/src/util/tests
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-15 07:58:07 -0800
committerJason Ekstrand <[email protected]>2015-01-15 13:21:27 -0800
commit8ed5305d28d9309d651dfec3fbf4349854694694 (patch)
tree0af9af419be48ecd3b00934cfd355c9285c1fd7d /src/util/tests
parentf0aec4ee1e364927f3003cabafa644035bcd803c (diff)
hash_table: Rename insert_with_hash to insert_pre_hashed
We already have search_pre_hashed. This makes the APIs match better. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/util/tests')
-rw-r--r--src/util/tests/hash_table/collision.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/tests/hash_table/collision.c b/src/util/tests/hash_table/collision.c
index 2da316dd727..b76782b32f7 100644
--- a/src/util/tests/hash_table/collision.c
+++ b/src/util/tests/hash_table/collision.c
@@ -42,8 +42,8 @@ main(int argc, char **argv)
ht = _mesa_hash_table_create(NULL, NULL, _mesa_key_string_equal);
- _mesa_hash_table_insert_with_hash(ht, bad_hash, str1, NULL);
- _mesa_hash_table_insert_with_hash(ht, bad_hash, str2, NULL);
+ _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str1, NULL);
+ _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str2, NULL);
entry1 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str1);
assert(entry1->key == str1);
@@ -63,11 +63,11 @@ main(int argc, char **argv)
/* Put str1 back, then spam junk into the table to force a
* resize and make sure we can still find them both.
*/
- _mesa_hash_table_insert_with_hash(ht, bad_hash, str1, NULL);
+ _mesa_hash_table_insert_pre_hashed(ht, bad_hash, str1, NULL);
for (i = 0; i < 100; i++) {
char *key = malloc(10);
sprintf(key, "spam%d", i);
- _mesa_hash_table_insert_with_hash(ht, _mesa_hash_string(key), key, NULL);
+ _mesa_hash_table_insert_pre_hashed(ht, _mesa_hash_string(key), key, NULL);
}
entry1 = _mesa_hash_table_search_pre_hashed(ht, bad_hash, str1);
assert(entry1->key == str1);