mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
dynarray: Add pa_dynarray_remove_by_data()
This commit is contained in:
parent
9efe77c8e5
commit
7d3879c07f
2 changed files with 25 additions and 0 deletions
|
|
@ -51,6 +51,11 @@ void *pa_dynarray_last(pa_dynarray *array);
|
|||
/* Returns -PA_ERR_NOENTITY if i is out of bounds, and zero otherwise. */
|
||||
int pa_dynarray_remove_by_index(pa_dynarray *array, unsigned i);
|
||||
|
||||
/* Returns -PA_ERR_NOENTITY if p is not found in the array, and zero
|
||||
* otherwise. If the array contains multiple occurrencies of p, only one of
|
||||
* them is removed (and it's unspecified which one). */
|
||||
int pa_dynarray_remove_by_data(pa_dynarray *array, void *p);
|
||||
|
||||
/* Returns the removed item, or NULL if the array is empty. */
|
||||
void *pa_dynarray_steal_last(pa_dynarray *array);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue