mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
idxset: Add pa_idxset_remove_all()
Slightly nicer than using pa_idxset_steal_first() in a loop.
This commit is contained in:
parent
31ee1a7d54
commit
2c666e3e16
6 changed files with 25 additions and 37 deletions
|
|
@ -282,12 +282,9 @@ int pa_scache_remove_item(pa_core *c, const char *name) {
|
|||
}
|
||||
|
||||
void pa_scache_free_all(pa_core *c) {
|
||||
pa_scache_entry *e;
|
||||
|
||||
pa_assert(c);
|
||||
|
||||
while ((e = pa_idxset_steal_first(c->scache, NULL)))
|
||||
free_entry(e);
|
||||
pa_idxset_remove_all(c->scache, (pa_free_cb_t) free_entry);
|
||||
|
||||
if (c->scache_auto_unload_event) {
|
||||
c->mainloop->time_free(c->scache_auto_unload_event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue