mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 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
|
|
@ -652,11 +652,9 @@ int pa_proplist_contains(pa_proplist *p, const char *key) {
|
|||
}
|
||||
|
||||
void pa_proplist_clear(pa_proplist *p) {
|
||||
struct property *prop;
|
||||
pa_assert(p);
|
||||
|
||||
while ((prop = pa_hashmap_steal_first(MAKE_HASHMAP(p))))
|
||||
property_free(prop);
|
||||
pa_hashmap_remove_all(MAKE_HASHMAP(p), (pa_free_cb_t) property_free);
|
||||
}
|
||||
|
||||
pa_proplist* pa_proplist_copy(const pa_proplist *p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue