Fixed multiple bugs in hashmap implementation.
Some checks failed
clang-build / clang-build (push) Has been cancelled
gcc-build / gcc-build (push) Has been cancelled
Some checks failed
clang-build / clang-build (push) Has been cancelled
gcc-build / gcc-build (push) Has been cancelled
1. Fixed infinite loop issue that occurred when map was full of tombstones; 2. Fixed bug related to tombstone count decrement when adding a new key on a deleted slot; 3. Added proper map resize when keys are added or removed; 4. Fixed inconsistent error messages; 5. Added proper NULL check on map_remove method.
This commit is contained in:
@@ -54,6 +54,7 @@ defined as follows:
|
||||
typedef enum {
|
||||
MAP_OK = 0x0,
|
||||
MAP_ERR_ALLOCATE,
|
||||
MAP_ERR_OVERFLOW,
|
||||
MAP_ERR_INVALID,
|
||||
MAP_ERR_NOT_FOUND
|
||||
} map_status_t;
|
||||
|
||||
Reference in New Issue
Block a user