---
src/pulsecore/hashmap.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index ac2092a..6cbee5a 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -80,4 +80,8 @@ void* pa_hashmap_last(pa_hashmap *h);
#define PA_HASHMAP_FOREACH_BACKWARDS(e, h, state) \
for ((state) = NULL, (e) = pa_hashmap_iterate_backwards((h), &(state),
NULL); (e); (e) = pa_hashmap_iterate_backwards((h), &(state), NULL))
+/* A macro to ease iteration through all entries, using the key as well as the
value */
+#define PA_HASHMAP_FOREACH_KEY(e, k, h, state) \
+ for ((state) = NULL, (e) = pa_hashmap_iterate((h), &(state), &(k)); (e);
(e) = pa_hashmap_iterate((h), &(state), &(k)))
+
#endif
--
1.7.10.4
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss