[pulseaudio-discuss] signature of pa_proplist_copy() claims to modify rhs
mm0pointer at maazl.de
Fri Mar 2 14:09:44 PST 2012
>> > Is there a serious reason why pa_proplist_copy takes a non constant
>> > pointer to the property list to copy?
> I don't think there is, other than the hassle to implement a variant of
> pa_hashmap_iterate() (called by pa_proplist_update(), which is called by
> pa_proplist_copy()) that takes a const pa_hashmap pointer and returns
> const pointers. That could be avoided by doing some ugly casts in
> pa_proplist_update(). I'm not sure which is worse - duplicating
> pa_hashmap_iterate() or the ugly casts. In any case, if the
> non-constness of the pa_proplist_copy() argument is a problem for
> someone, I think we should fix pa_proplist_copy() in one way or another.
In fact I did the same ugly cast in the wrapper function, too. I had no
I only wondered because the pulseaoudio API is otherwise quite accurate
More information about the pulseaudio-discuss