diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-19 04:15:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-19 04:15:20 +0100 |
commit | 11dd41ce4b465f6260ce68aa050a488f88f694eb (patch) | |
tree | 32cf857bcd71798adc6184dd24fe358ae0048188 /hashmap.h | |
parent | 42f4e3c4413ad35e3815f25211fee95d775488a7 (diff) |
first try at implementing job creation
Diffstat (limited to 'hashmap.h')
-rw-r--r-- | hashmap.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -37,6 +37,7 @@ bool hashmap_isempty(Hashmap *h); void *hashmap_iterate(Hashmap *h, void **state, const void **key); void *hashmap_iterate_backwards(Hashmap *h, void **state, const void **key); +void hashmap_clear(Hashmap *h); void *hashmap_steal_first(Hashmap *h); void* hashmap_first(Hashmap *h); void* hashmap_last(Hashmap *h); @@ -44,6 +45,9 @@ void* hashmap_last(Hashmap *h); #define HASHMAP_FOREACH(e, h, state) \ for ((state) = NULL, (e) = hashmap_iterate((h), &(state), NULL); (e); (e) = hashmap_iterate((h), &(state), NULL)) +#define HASHMAP_FOREACH_KEY(e, k, h, state) \ + for ((state) = NULL, (e) = hashmap_iterate((h), &(state), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(state), (const void**) &(k))) + #define HASHMAP_FOREACH_BACKWARDS(e, h, state) \ for ((state) = NULL, (e) = hashmap_iterate_backwards((h), &(state), NULL); (e); (e) = hashmap_iterate_backwards((h), &(state), NULL)) |