hash.h revision 9553ded456671205527e19488e68c9cd0f25469b
#ifndef __HASH_H
#define __HASH_H
/* Returns hash code. */
typedef unsigned int hash_callback_t(const void *p);
/* Returns 0 if the pointers are equal. */
/* Create a new hash table. If initial_size is 0, the default value is used.
for smaller allocations and can also be alloconly pool. The pools must not
be free'd before hash_destroy() is called. */
struct hash_table *
/* Remove all nodes from hash table. If free_collisions is TRUE, the
memory allocated from node_pool is freed, or discarded with
alloconly pools. */
replaces the key in table to given one, while hash_update() doesnt. */
/* Iterates through all nodes in hash table. You may safely call hash_*()
functions while iterating, but if you add any new nodes, they may or may
not be called for in this iteration. */
/* Hash table isn't resized, and removed nodes aren't removed from
the list while hash table is freezed. Supports nesting. */
/* Copy all nodes from one hash table to another */
/* hash function for strings */
unsigned int str_hash(const void *p);
unsigned int strcase_hash(const void *p);
#endif