mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
hashmap: Add pa_hashmap_remove_all()
Slightly nicer than using pa_hashmap_steal_first() in a loop.
This commit is contained in:
parent
061878b5a4
commit
31ee1a7d54
7 changed files with 23 additions and 22 deletions
|
|
@ -48,6 +48,9 @@ void* pa_hashmap_get(pa_hashmap *h, const void *key);
|
|||
/* Returns the data of the entry while removing */
|
||||
void* pa_hashmap_remove(pa_hashmap *h, const void *key);
|
||||
|
||||
/* If free_cb is not NULL, it's called for each entry. */
|
||||
void pa_hashmap_remove_all(pa_hashmap *h, pa_free_cb_t free_cb);
|
||||
|
||||
/* Return the current number of entries of the hashmap */
|
||||
unsigned pa_hashmap_size(pa_hashmap *h);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue