added HashMap_pushOrUpdate
This commit is contained in:
@@ -29,6 +29,8 @@ typedef struct HashMap_ {
|
||||
#define HashMap_construct(PTR, T, VALUE_DESTRUCTOR) HashMap_construct_size(PTR, sizeof(T), VALUE_DESTRUCTOR)
|
||||
void HashMap_construct_size(HashMap_* ptr, u32 value_t_size, FreeFunction NULLABLE(value_destructor));
|
||||
void HashMap_destroy(HashMap_* ptr);
|
||||
void* NULLABLE(HashMap_tryGetPtr)(HashMap_* ptr, str key);
|
||||
bool HashMap_tryPush(HashMap_* ptr, str key, void* value_ptr);
|
||||
bool HashMap_tryDelete(HashMap_* ptr, str key);
|
||||
|
||||
bool HashMap_tryPush(HashMap_* ptr, const str key, void* value_ptr);
|
||||
void HashMap_pushOrUpdate(HashMap_* ptr, const str key, void* value_ptr);
|
||||
NULLABLE(void*) HashMap_tryGetPtr(const HashMap_* ptr, const str key);
|
||||
bool HashMap_tryDelete(HashMap_* ptr, const str key);
|
||||
|
||||
Reference in New Issue
Block a user