hashmap: add helper to test if iterator is still at beginning

This commit is contained in:
Lennart Poettering
2021-05-25 15:47:09 +02:00
parent 13eeefe1a8
commit 641d3761d4
+1
View File
@@ -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) \