42struct cx_hash_map_element_s;
84 size_t itemsize,
size_t buckets);
struct cx_allocator_s CxAllocator
High-Level type alias for the allocator type.
Definition allocator.h:80
#define CX_MALLOC
The attributed function always returns freshly allocated memory.
Definition common.h:156
#define CX_DEALLOC(...)
Not supported in clang.
Definition common.h:172
#define CX_NONNULL
All pointer arguments must be non-NULL.
Definition common.h:141
#define CX_NODISCARD
Warn about discarded return value.
Definition common.h:256
#define CX_EXTERN
Declares a function with external linkage.
Definition common.h:297
int cxMapRehash(CxMap *map)
Increases the number of buckets, if necessary.
CxMap * cxHashMapCreate(const CxAllocator *allocator, size_t itemsize, size_t buckets)
Creates a new hash map with the specified number of buckets.
Interface for map implementations.
void cxMapFree(CxMap *map)
Deallocates the memory of the specified map.
struct cx_map_s CxMap
Type for the UCX map.
Definition map.h:50
Internal structure for a hash map.
Definition hash_map.h:47
size_t bucket_count
The number of buckets.
Definition hash_map.h:59
struct cx_hash_map_element_s ** buckets
The buckets of this map, each containing a linked list of elements.
Definition hash_map.h:55
struct cx_map_s base
Base structure for maps.
Definition hash_map.h:51
Structure for the UCX map.
Definition map.h:62