On Mon, 07 Nov 2011 09:01:49 +0200 Tom Hacohen <[email protected]> wrote:
> 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. I plan on pulling out one of those functions (plus others) and replacing them with something more generic later anyway. But not now. I'll think it through properly when I do that. It's just internal support stuff, but at the time I was in my "don't mess with rasters code until I talk with him about it" mode. So one function is const, the other is not. Casting would have to be done somewhere between them to stop the bitching. -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ 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
