#include <hash.h>
◆ add_hash_item()
| struct hash_item * add_hash_item |
( |
struct hash * |
hash, |
|
|
const char * |
key, |
|
|
unsigned int |
keylen, |
|
|
void * |
value |
|
) |
| |
|
related |
◆ del_hash_item()
| void del_hash_item |
( |
struct hash * |
hash, |
|
|
struct hash_item * |
item |
|
) |
| |
|
related |
Delete item from hash.
If key and/or value were dynamically allocated, think about freeing them. This function doesn't do that.
◆ foreach_hash_item
| #define foreach_hash_item |
( |
|
item, |
|
|
|
hash_table, |
|
|
|
iterator |
|
) |
| |
|
related |
Value: for (iterator = 0; iterator < (1 << (hash_table).
width); iterator++) \
foreach (item, (hash_table).hash[iterator])
unsigned int width
Number of bits - hash array must be 2^width long.
Definition hash.h:25
◆ free_hash()
| void free_hash |
( |
struct hash ** |
hashp | ) |
|
|
related |
◆ get_hash_item()
| struct hash_item * get_hash_item |
( |
struct hash * |
hash, |
|
|
const char * |
key, |
|
|
unsigned int |
keylen |
|
) |
| |
|
related |
◆ init_hash8()
| struct hash * init_hash8 |
( |
void |
| ) |
|
|
related |
◆ func
◆ hash
◆ width
Number of bits - hash array must be 2^width long.
The documentation for this struct was generated from the following files: