It seems nobody's using the string hashing function. If you try to
pass it directly to the hashtable creation function, you'll get
compiler warning for non matching prototypes. Let's make them match.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/** FNV-1a string hash implementation */
uint32_t
-_mesa_hash_string(const char *key)
+_mesa_hash_string(const void *_key)
{
uint32_t hash = _mesa_fnv32_1a_offset_bias;
+ const char *key = _key;
while (*key != 0) {
hash = _mesa_fnv32_1a_accumulate(hash, *key);
bool (*predicate)(struct hash_entry *entry));
uint32_t _mesa_hash_data(const void *data, size_t size);
-uint32_t _mesa_hash_string(const char *key);
+uint32_t _mesa_hash_string(const void *key);
bool _mesa_key_string_equal(const void *a, const void *b);
bool _mesa_key_pointer_equal(const void *a, const void *b);