mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
hashmap: add helper to test if iterator is still at beginning
This commit is contained in:
parent
13eeefe1a8
commit
641d3761d4
@ -51,6 +51,7 @@ typedef struct {
|
||||
|
||||
#define _IDX_ITERATOR_FIRST (UINT_MAX - 1)
|
||||
#define ITERATOR_FIRST ((Iterator) { .idx = _IDX_ITERATOR_FIRST, .next_key = NULL })
|
||||
#define ITERATOR_IS_FIRST(i) ((i).idx == _IDX_ITERATOR_FIRST)
|
||||
|
||||
/* Macros for type checking */
|
||||
#define PTR_COMPATIBLE_WITH_HASHMAP_BASE(h) \
|
||||
|
Loading…
Reference in New Issue
Block a user