On 07/11/11 08:53, David Seikel wrote:
> In this case, the warnings are either saying that one of the functions
> is defined wrong, or that I should just cast to const for one to shut
> it up.
>
> Personally I think that making a function parameter const when the whole
> point of passing that parameter is for the function to change it is a
> bit silly.  But constness has had it's own flame wars, and I did not
> write either of the functions I'm calling.  shrugs
>
> So right now, I'm just gonna cast and shut up the warning.  I'll leave
> it to others to open up the entire const debate again if they desire.  I
> don't really care, I'll just use what's there.  And If I have to cast
> something to const to shut up something that is bitching about the non
> constness of something that is REALLY not const, then so be it.

I haven't looked at the code, but "const char **" doesn't mean it's a 
const. It's a pointer to a "const char *" which just means: your 
parameter will be populated with a "const char *", don't free it.

There's no const debate (none that I'm aware of anyway), especially not 
in this case (again, without reading the source, just judging from the 
error).

I guess the reason it's const is because it's a stringshare, which 
should be const and indeed doesn't change and should not be changed.

--
Tom.

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to