Banjo API 0.0.1
Multi-purpose C99 API
|
Header file for Hash Table container type.
Go to the source code of this file.
Macros | |
#define | bj_htable_new_t(K, V) |
Creates a new bj_htable with types inferred for keys and values. | |
Typedefs | |
typedef uint32_t(* | bj_hash_fn) (const void *p_data, size_t size) |
Function type for hashing keys. | |
typedef struct bj_htable_t | bj_htable |
Typedef for the bj_htable_t struct. | |
Functions | |
bj_htable * | bj_htable_new (size_t bytes_key, size_t bytes_value) |
Creates a new bj_htable with the specified sizes for keys and values. | |
void | bj_htable_del (bj_htable *p_table) |
Deletes a bj_htable object and releases associated memory. | |
void * | bj_htable_set (bj_htable *table, void *p_key, void *p_value) |
Inserts a value into the hash table. | |
void * | bj_htable_get (const bj_htable *table, const void *p_key, void *p_default) |
Returns the value associated with p_key , if it exists. | |
size_t | bj_htable_len (const bj_htable *table) |
Returns the number of elements in the table. | |