#include <string.h>
#include "defs.h"
#include "memory.h"
Go to the source code of this file.
|
| #define | map_insert_ty(ty, map, key, data) map_insert(map, key, data, sizeof(ty)) |
| |
| #define | map_get_ty(ty, map, key) (ty *)map_get(map, key) |
| | Returns a typed pointer to a member at key key. Returns NULL if the key is not present.
|
| |
◆ map_get_ty
| #define map_get_ty |
( |
|
ty, |
|
|
|
map, |
|
|
|
key |
|
) |
| (ty *)map_get(map, key) |
Returns a typed pointer to a member at key key. Returns NULL if the key is not present.
◆ map_insert_ty
| #define map_insert_ty |
( |
|
ty, |
|
|
|
map, |
|
|
|
key, |
|
|
|
data |
|
) |
| map_insert(map, key, data, sizeof(ty)) |
◆ hash_function_f
◆ map_bucket_t
◆ map_key_t
◆ map_t
◆ map_calculate_next_capacity()
| static sz map_calculate_next_capacity |
( |
const map_t * |
map | ) |
|
|
static |
Calculates the next capacity for the map. May return the same capacity if the MAP_LOAD_FACTOR is not reached. O(1*)
◆ map_insert()
◆ map_should_grow()
| static bool map_should_grow |
( |
const map_t * |
map | ) |
|
|
static |
Calculates if the map reached its MAP_LOAD_FACTOR. O(1)