signature of pa_proplist_copy() claims to modify rhs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> > 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 
choice anyway.
I only wondered because the pulseaoudio API is otherwise quite accurate 
regarding constness.


Marcel


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux