return 0;
}
-void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other) {
+void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, const pa_proplist *other) {
struct property *prop;
void *state = NULL;
if (mode == PA_UPDATE_SET)
pa_proplist_clear(p);
+ /* MAKE_HASHMAP turns the const pointer into a non-const pointer, but
+ * that's ok, because we don't modify the hashmap contents. */
while ((prop = pa_hashmap_iterate(MAKE_HASHMAP(other), &state, NULL))) {
if (mode == PA_UPDATE_MERGE && pa_proplist_contains(p, prop->key))
property_free(prop);
}
-pa_proplist* pa_proplist_copy(pa_proplist *template) {
+pa_proplist* pa_proplist_copy(const pa_proplist *template) {
pa_proplist *p;
pa_assert_se(p = pa_proplist_new());
/** Merge property list "other" into "p", adhering the merge mode as
* specified in "mode". \since 0.9.11 */
-void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, pa_proplist *other);
+void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, const pa_proplist *other);
/** Removes a single entry from the property list, identified be the
* specified key name. \since 0.9.11 */
/** Allocate a new property list and copy over every single entry from
* the specific list. \since 0.9.11 */
-pa_proplist* pa_proplist_copy(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 */
unsigned pa_proplist_size(pa_proplist *p);