Add an LfHashMap cursor #7

Merged
fputs merged 1 commit from fputs/hashmap-cursor into master 2026-11-05 09:32:49 -08:00 AGit
Owner

Adds LfHashMapCursor. The walk yields each live pair once and skips empty and tombstone slots. Order is unspecified. A stored NULL value is a hit. Exhaustion and invalid arguments leave *key and *value unchanged.

insert, remove, replace, clear, and destroy invalidate the cursor. The implementation does not detect use after that. Hash policy and the existing mutators are unchanged.

Tested with -DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF. ctest --label-exclude slow: 25/25 passed.

Adds `LfHashMapCursor`. The walk yields each live pair once and skips empty and tombstone slots. Order is unspecified. A stored NULL value is a hit. Exhaustion and invalid arguments leave `*key` and `*value` unchanged. `insert`, `remove`, `replace`, `clear`, and `destroy` invalidate the cursor. The implementation does not detect use after that. Hash policy and the existing mutators are unchanged. Tested with `-DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF`. `ctest --label-exclude slow`: 25/25 passed.
Add an LfHashMap cursor
All checks were successful
test / test (pull_request) Successful in 13s
test / sanitize (pull_request) Successful in 15s
92059105dd
fputs merged commit 8d70462f1e into master 2026-11-05 09:32:49 -08:00
fputs referenced this pull request from a commit 2026-11-05 09:32:50 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
fputs/libflint!7
No description provided.