mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
hashmap: Add a key+value iterator
This commit is contained in:
parent
8753b8c147
commit
0a5f3bfaf0
1 changed files with 4 additions and 0 deletions
|
|
@ -85,6 +85,10 @@ void* pa_hashmap_last(pa_hashmap *h);
|
|||
#define PA_HASHMAP_FOREACH(e, h, state) \
|
||||
for ((state) = NULL, (e) = pa_hashmap_iterate((h), &(state), NULL); (e); (e) = pa_hashmap_iterate((h), &(state), NULL))
|
||||
|
||||
/* A macro to ease itration through all key, value pairs */
|
||||
#define PA_HASHMAP_FOREACH_KV(k, e, h, state) \
|
||||
for ((state) = NULL, (e) = pa_hashmap_iterate((h), &(state), (const void **) &(k)); (e); (e) = pa_hashmap_iterate((h), &(state), (const void **) &(k)))
|
||||
|
||||
/* A macro to ease iteration through all entries, backwards */
|
||||
#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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue