Bug 10475 - Lots of char*/const char* mixups
Summary: Lots of char*/const char* mixups
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-30 08:47 UTC by Tilman Sauerbeck
Modified: 2007-04-06 03:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch (13.51 KB, patch)
2007-03-30 09:15 UTC, Tilman Sauerbeck
no flags Details | Splinter Review

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.