[PATCH:libX11 1/2] Bug 32098: Making XInternAtoms take const char ** breaks callers

Simon Thum simon.thum at gmx.de
Tue Dec 14 15:48:50 PST 2010


On 12/14/2010 10:01 PM, Alan Coopersmith wrote:
> Unfortunately, this was a surprise to me, since I was expecting it to
> behave as const char * does when passed char * pointers, as apparently
> did everyone on xorg-devel when the patch went by.

Another myth debunked: "applying const gets you benefits".

Thank you, at least I feel less stupid now!

But wouldn't all that mean the correct decl would be "const char* const
*"? Then no-one would have to assume a temporary might get modified. (I
didn't read into it too deep, however)

Cheers,

Simon


More information about the xorg-devel mailing list