parallax 1.0
command-line based task/todo manager
|
Contains detailed implementation of the public procedures in the hashmap API. More...
Go to the source code of this file.
Functions | |
HashMap * | hashmap_create (size_t table_size) |
Creates a hashmap of a fixed size. | |
void | hashmap_set (HashMap *map, char *key, void *value) |
Adds an entry to a hashmap by a key string and value. | |
void * | hashmap_get (HashMap *map, char *key) |
Finds an entry in a non-empty hashmap by a key. | |
void | hashmap_elem_remove (HashMap *map, char *key) |
Removes an entry in a hashmap by its key. | |
void | hashmap_destroy (HashMap *map) |
Frees a hashmap to memory. |
Contains detailed implementation of the public procedures in the hashmap API.
Definition in file hashmap.c.
HashMap * hashmap_create | ( | size_t | table_size | ) |
Creates a hashmap of a fixed size.
table_size | Size of the hash table |
Definition at line 32 of file hashmap.c.
void hashmap_destroy | ( | HashMap * | map | ) |
Frees a hashmap to memory.
map | Pointer to the hashmap |
void hashmap_elem_remove | ( | HashMap * | map, |
char * | key ) |
Removes an entry in a hashmap by its key.
map | Pointer to the hashmap |
key | Pointer to the key string |
Definition at line 102 of file hashmap.c.
void * hashmap_get | ( | HashMap * | map, |
char * | key ) |
Finds an entry in a non-empty hashmap by a key.
Utilizes the standard approach of hashing and appending to non-empty entries.
map | Pointer to the hashmap |
key | Pointer to the key string |
Definition at line 80 of file hashmap.c.
void hashmap_set | ( | HashMap * | map, |
char * | key, | ||
void * | value ) |
Adds an entry to a hashmap by a key string and value.
map | Pointer to the hashmap |
key | Pointer to the key string |
value | Pointer to the value |
Definition at line 42 of file hashmap.c.