mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
hashmap: introduce PA_HASHMAP_FOREACH macro
This commit is contained in:
parent
e84644aa88
commit
496be212ad
2 changed files with 5 additions and 1 deletions
|
|
@ -65,4 +65,8 @@ void *pa_hashmap_steal_first(pa_hashmap *h);
|
|||
/* Return the oldest entry in the hashmap */
|
||||
void* pa_hashmap_first(pa_hashmap *h);
|
||||
|
||||
/* A macro to ease iteration through all entries */
|
||||
#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))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ unsigned pa_idxset_size(pa_idxset*s);
|
|||
/* Return TRUE of the idxset is empty */
|
||||
pa_bool_t pa_idxset_isempty(pa_idxset *s);
|
||||
|
||||
|
||||
/* A macro to ease iteration through all entries */
|
||||
#define PA_IDXSET_FOREACH(e, s, idx) \
|
||||
for ((e) = pa_idxset_first((s), &(idx)); (e); (e) = pa_idxset_next((s), &(idx)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue