Context detection, compiler abstractions, utility macros, and data structures.
Sized UTF-8 string slices (String8) and manipulation utilities.
Core fixed-width type aliases and memory size constants.
BaseMapIter base_map_iter_begin(BaseMap *map)
Initializes an iterator positioned before the first entry.
BaseMapNode * base_map_iter_next(BaseMapIter *it)
Advances the iterator and returns the next live node.
String8 base_map_intern(MemAllocator *alloc, BaseMap *map, String8 str)
Interns a string, returning a stable canonical copy.
BaseMapInsertResult
Result returned by base_map_insert() indicating whether the key was new or already present.
u64 base_hash_str8(String8 str)
Hashes a String8 using the FNV-1a (64-bit) algorithm.
BaseMap base_map_create(MemAllocator *alloc, usize bucket_count)
Creates and returns an initialized BaseMap.
b32 base_map_unlink(BaseMap *map, String8 key)
Logically removes a key by unlinking its node from the bucket chain.
void * base_map_lookup(BaseMap *map, String8 key)
Looks up a value by key.
BaseMapInsertResult base_map_insert(MemAllocator *alloc, BaseMap *map, String8 key, void *val)
Inserts or updates a key-value pair.
#define C_LINKAGE_END
Closes a C linkage block for C++ compilers (Empty in C).
#define C_LINKAGE_BEGIN
Opens a C linkage block for C++ compilers (Empty in C).
Generic interface for abstracting memory allocators.
Iterator for walking all live entries in a map.
An abstract allocator interface.
A sized UTF-8 string slice.