Switch hash tables to longs, as longs guarantee 32 bits.

The default FNV hash requires 32 bits at least.
This commit is contained in:
2017-01-27 21:29:28 -08:00
parent 0271248472
commit c8d733e410
2 changed files with 9 additions and 9 deletions

View File

@@ -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.