proplist: pa_proplist_[size|isempty]: constify proplist pointer

This commit is contained in:
Lyndon Brown 2018-05-27 04:40:07 +01:00 committed by Arun Raghavan
parent 5a146049df
commit 2562446c4a
2 changed files with 4 additions and 4 deletions

View file

@ -662,13 +662,13 @@ pa_proplist* pa_proplist_copy(const pa_proplist *p) {
return copy; return copy;
} }
unsigned pa_proplist_size(pa_proplist *p) { unsigned pa_proplist_size(const pa_proplist *p) {
pa_assert(p); pa_assert(p);
return pa_hashmap_size(MAKE_HASHMAP_CONST(p)); return pa_hashmap_size(MAKE_HASHMAP_CONST(p));
} }
int pa_proplist_isempty(pa_proplist *p) { int pa_proplist_isempty(const pa_proplist *p) {
pa_assert(p); pa_assert(p);
return pa_hashmap_isempty(MAKE_HASHMAP_CONST(p)); return pa_hashmap_isempty(MAKE_HASHMAP_CONST(p));

View file

@ -397,10 +397,10 @@ void pa_proplist_clear(pa_proplist *p);
pa_proplist* pa_proplist_copy(const pa_proplist *p); pa_proplist* pa_proplist_copy(const pa_proplist *p);
/** Return the number of entries in the property list. \since 0.9.15 */ /** Return the number of entries in the property list. \since 0.9.15 */
unsigned pa_proplist_size(pa_proplist *p); unsigned pa_proplist_size(const pa_proplist *p);
/** Returns 0 when the proplist is empty, positive otherwise \since 0.9.15 */ /** Returns 0 when the proplist is empty, positive otherwise \since 0.9.15 */
int pa_proplist_isempty(pa_proplist *p); int pa_proplist_isempty(const pa_proplist *p);
/** Return non-zero when a and b have the same keys and values. /** Return non-zero when a and b have the same keys and values.
* \since 0.9.16 */ * \since 0.9.16 */