mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
strlist: add new calls pa_strlist_{next|data}()
This commit is contained in:
parent
9208b86b5e
commit
23a798caf6
2 changed files with 18 additions and 0 deletions
|
|
@ -159,3 +159,15 @@ pa_strlist *pa_strlist_reverse(pa_strlist *l) {
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pa_strlist *pa_strlist_next(pa_strlist *s) {
|
||||||
|
pa_assert(s);
|
||||||
|
|
||||||
|
return s->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *pa_strlist_data(pa_strlist *s) {
|
||||||
|
pa_assert(s);
|
||||||
|
|
||||||
|
return ITEM_TO_TEXT(s);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,4 +47,10 @@ pa_strlist* pa_strlist_parse(const char *s);
|
||||||
/* Reverse string list */
|
/* Reverse string list */
|
||||||
pa_strlist *pa_strlist_reverse(pa_strlist *l);
|
pa_strlist *pa_strlist_reverse(pa_strlist *l);
|
||||||
|
|
||||||
|
/* Return the next item in the list */
|
||||||
|
pa_strlist *pa_strlist_next(pa_strlist *s);
|
||||||
|
|
||||||
|
/* Return the string associated to the current item */
|
||||||
|
const char *pa_strlist_data(pa_strlist *s);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue