Bug 10475

Summary: Lots of char*/const char* mixups
Product: xorg Reporter: Tilman Sauerbeck <tilman>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: keithp
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch none

Description Tilman Sauerbeck 2007-03-30 08:47:57 UTC
libX11 uses char* to store string literals in thousand places. Which is obviously wrong.
Comment 1 Tilman Sauerbeck 2007-03-30 09:15:38 UTC
Created attachment 9386 [details] [review]
Patch

This patches fixes most of these errors.

It also touches the arguments/return values of two public libX11 functions, where they used to deal with char* which are now const char*. That's annoying, but correct ;)
Comment 2 Tilman Sauerbeck 2007-03-31 03:30:55 UTC
Keith, can you have a look at this and tell me whether it's okay to tweak public headers like this?
It's in the first two chunks of the patch.
Comment 3 Keith Packard 2007-03-31 09:06:43 UTC
The internal changes are all fine. Changes to the public API should be reviewed by the project as a whole; can you start a discussion about adding const to public APIs on xorg@lists.freedesktop.org and see if you get any answers? 
Comment 4 Tilman Sauerbeck 2007-04-06 03:00:21 UTC
Committed in 1c75a9479011e5f1ad01c950628d0ef5a302d8b6.

I didn't include the bits that touched public headers.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.