signature of pa_proplist_copy() claims to modify rhs

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

 



On Mon, 2012-02-27 at 06:25 +0200, Tanu Kaskinen wrote:
> On Sun, 2012-02-26 at 12:04 +0100, Marcel M?ller wrote:
> > 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.

As I understand it, const-ness is only a compiler hint so there isn't
ABI breakage here. Since the qualifier only really applies in the
function's scope, no API breakage either.

So unless someone with more C-fu skillz than I have points out
otherwise, I'm okay with fixing this up.

-- Arun



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

  Powered by Linux