38 struct hash*
const o_hash,
39 size_t const i_buckets,
44 struct hash*
const io_hash);
48 struct hash*
const io_hash,
55 struct hash*
const io_hash,
60 struct hash*
const io_hash,
void(* hash_remove_cb)(void *io_value)
function prototype that is called to delete a value
Definition: hash.h:26
struct bucket ** m_bucket
Definition: hash.h:31
void hash_discharge(struct hash *const io_hash)
release resources held by the object
Definition: hash.c:196
size_t m_slots
Definition: hash.h:32
int hash_assign(struct hash *const o_hash, size_t const i_buckets, hash_remove_cb i_remove)
initialize hash object
Definition: hash.c:163
struct bucket * m_next
Definition: hash.h:22
int hash_remove(struct hash *const io_hash, char const *i_key)
remove a key fromt the hash table
Definition: hash.c:326
hash_remove_cb m_remove
Definition: hash.h:33
int hash_insert(struct hash *const io_hash, char const *i_key, void *i_value)
insert a key and value
Definition: hash.c:218
void * hash_lookup(int *const o_found, struct hash *const io_hash, char const *i_key)
lookup a value
Definition: hash.c:270
void * m_value
Definition: hash.h:21
char * m_key
Definition: hash.h:20
hash data structure that holds keys and values
Definition: hash.h:29
internal data structure that holds a single key and value
Definition: hash.h:18