Commit 66d9b3b5 authored by Harald Hoyer's avatar Harald Hoyer Committed by Lennart Poettering
Browse files

hashmap: HASHMAP_FOREACH* iterate until ITERATOR_LAST

parent 0ebd74d8
......@@ -77,12 +77,12 @@ void* hashmap_first(Hashmap *h);
void* hashmap_last(Hashmap *h);
#define HASHMAP_FOREACH(e, h, i) \
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL))
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (i) != ITERATOR_LAST; (e) = hashmap_iterate((h), &(i), NULL))
#define HASHMAP_FOREACH_KEY(e, k, h, i) \
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (i) != ITERATOR_LAST; (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL))
for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (i) != ITERATOR_FIRST; (e) = hashmap_iterate_backwards((h), &(i), NULL))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment