hash.h revision 1f9d5d6b2feca30ea92848f2f8f5f7d37e0613f7
#ifndef __HASH_H
#define __HASH_H
/* Returns hash code. */
typedef unsigned int (*HashFunc) (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.
is used. */
#ifdef POOL_CHECK_LEAKS
#else
# define hash_destroy_clean(table)
#endif
replaces the key in table to given one, while hash_update() doesnt. */
/* Calls the given function for each node in hash table. You may safely
call hash_*() functions inside your function, but if you add any
new nodes, they may or may not be called for in this foreach loop. */
/* Stop the active hash_foreach() loop */
void hash_foreach_stop(void);
/* Hash table isn't resized, and removed nodes aren't removed from
the list while hash table is freezed. Supports nesting. */
/* hash function for strings */
unsigned int str_hash(const void *p);
unsigned int strcase_hash(const void *p);
#endif