Prototype for a Key hashing function. More...
Functions | |
static size_t | gen_hash_string (union HashKey key, size_t num_elems) |
Generate a hash from a string - Implements hash_gen_hash_t -. | |
static size_t | gen_hash_case_string (union HashKey key, size_t num_elems) |
Generate a hash from a string (ignore the case) - Implements hash_gen_hash_t -. | |
static size_t | gen_hash_int (union HashKey key, size_t num_elems) |
Generate a hash from an integer - Implements hash_gen_hash_t -. | |
Prototype for a Key hashing function.
key | Key to hash |
num_elems | Number of elements in the Hash Table |
Turn a Key (a string or an integer) into a hash id. The hash id will be a number between 0 and (num_elems-1).
|
static |
Generate a hash from a string - Implements hash_gen_hash_t -.
Definition at line 44 of file hash.c.
|
static |
Generate a hash from a string (ignore the case) - Implements hash_gen_hash_t -.
Definition at line 71 of file hash.c.
|
static |
Generate a hash from an integer - Implements hash_gen_hash_t -.
Definition at line 96 of file hash.c.