Hashing infrastructure.
More...
#include <string.h>
#include "elinks.h"
#include "util/hash.h"
#include "util/memory.h"
◆ HASH_MAGIC
#define HASH_MAGIC 0xdeadbeef |
Initialization vector for the hash function.
I've no much idea about what to set here.. I think it doesn't matter much anyway.. ;) –pasky
◆ hash_mask
◆ hash_size
#define hash_size |
( |
| n | ) |
(1 << (n)) |
◆ X31_HASH
#define X31_HASH /* Weaker but faster */ |
◆ init_hash()
◆ strhash()
Fast string hashing.
- Parameters
-
k | the key |
length | the length of the key |
initval | the previous hash, or an arbitrary value |