mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
rename pa_hook_free() to pa_hook_done() since the hook struct is allocated on the stack not via malloc
This commit is contained in:
parent
34c435480f
commit
084f4292f6
4 changed files with 4 additions and 4 deletions
|
|
@ -192,7 +192,7 @@ static void core_free(pa_object *o) {
|
||||||
pa_shared_cleanup(c);
|
pa_shared_cleanup(c);
|
||||||
|
|
||||||
for (j = 0; j < PA_CORE_HOOK_MAX; j++)
|
for (j = 0; j < PA_CORE_HOOK_MAX; j++)
|
||||||
pa_hook_free(&c->hooks[j]);
|
pa_hook_done(&c->hooks[j]);
|
||||||
|
|
||||||
pa_xfree(c);
|
pa_xfree(c);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ static void slot_free(pa_hook *hook, pa_hook_slot *slot) {
|
||||||
pa_xfree(slot);
|
pa_xfree(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pa_hook_free(pa_hook *hook) {
|
void pa_hook_done(pa_hook *hook) {
|
||||||
pa_assert(hook);
|
pa_assert(hook);
|
||||||
pa_assert(hook->n_firing == 0);
|
pa_assert(hook->n_firing == 0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ struct pa_hook {
|
||||||
};
|
};
|
||||||
|
|
||||||
void pa_hook_init(pa_hook *hook, void *data);
|
void pa_hook_init(pa_hook *hook, void *data);
|
||||||
void pa_hook_free(pa_hook *hook);
|
void pa_hook_done(pa_hook *hook);
|
||||||
|
|
||||||
pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_priority_t prio, pa_hook_cb_t cb, void *data);
|
pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_priority_t prio, pa_hook_cb_t cb, void *data);
|
||||||
void pa_hook_slot_free(pa_hook_slot *slot);
|
void pa_hook_slot_free(pa_hook_slot *slot);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
pa_hook_fire(&hook, (void*) "call2");
|
pa_hook_fire(&hook, (void*) "call2");
|
||||||
|
|
||||||
pa_hook_free(&hook);
|
pa_hook_done(&hook);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue