mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
add pa_proplist_size() and pa_proplist_isempty()
This commit is contained in:
parent
ef5a2b5f2c
commit
1872526508
2 changed files with 18 additions and 0 deletions
|
|
@ -406,3 +406,15 @@ pa_proplist* pa_proplist_copy(pa_proplist *template) {
|
|||
|
||||
return p;
|
||||
}
|
||||
|
||||
unsigned pa_proplist_size(pa_proplist *p) {
|
||||
pa_assert(p);
|
||||
|
||||
return pa_hashmap_size(MAKE_HASHMAP(p));
|
||||
}
|
||||
|
||||
int pa_proplist_isempty(pa_proplist *p) {
|
||||
pa_assert(p);
|
||||
|
||||
return pa_hashmap_isempty(MAKE_HASHMAP(p));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,6 +228,12 @@ void pa_proplist_clear(pa_proplist *p);
|
|||
* the specific list. \since 0.9.11 */
|
||||
pa_proplist* pa_proplist_copy(pa_proplist *t);
|
||||
|
||||
/** Return the number of entries on the property list. \since 0.9.15 */
|
||||
unsigned pa_proplist_size(pa_proplist *t);
|
||||
|
||||
/** Returns 0 when the proplist is empty, positive otherwise \since 0.9.15 */
|
||||
int pa_proplist_isempty(pa_proplist *t);
|
||||
|
||||
PA_C_DECL_END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue