Switch hash tables to longs, as longs guarantee 32 bits.
The default FNV hash requires 32 bits at least.
This commit is contained in:
@@ -45,7 +45,7 @@ struct ht_s {
|
||||
* @param input the data being hashed.
|
||||
* @return the data's hash.
|
||||
*/
|
||||
unsigned int (*hash_func)(void* input);
|
||||
unsigned long (*hash_func)(void* input);
|
||||
/**
|
||||
* Function to compare two keys.
|
||||
* @param given_key the key being used to retrieve data
|
||||
@@ -76,7 +76,7 @@ typedef struct ht_s ht;
|
||||
* @param key the data to hash.
|
||||
* @return the produced hashed integer.
|
||||
*/
|
||||
unsigned int ht_default_hash_func(void* key);
|
||||
unsigned long ht_default_hash_func(void* key);
|
||||
/**
|
||||
* The default key comparison function.
|
||||
* Assumes both keys are strings and uses strcmp.
|
||||
|
||||
Reference in New Issue
Block a user