summaryrefslogtreecommitdiff
path: root/hashmap.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-19 04:15:20 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-19 04:15:20 +0100
commit11dd41ce4b465f6260ce68aa050a488f88f694eb (patch)
tree32cf857bcd71798adc6184dd24fe358ae0048188 /hashmap.h
parent42f4e3c4413ad35e3815f25211fee95d775488a7 (diff)
first try at implementing job creation
Diffstat (limited to 'hashmap.h')
-rw-r--r--hashmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hashmap.h b/hashmap.h
index e3b9d9aa30..91d8b46dba 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -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))