libX11: fixing public headers?

Tilman Sauerbeck tilman at code-monkey.de
Wed Apr 4 08:58:09 PDT 2007


Thomas Dickey [2007-04-02 11:01]:
> On Mon, Apr 02, 2007 at 08:49:19AM -0600, Brian Paul wrote:
> > Keith Packard wrote:
> > >On Sun, 2007-04-01 at 11:50 +0200, Tilman Sauerbeck wrote:
> > >
> > >>What does everyone think about adding "const" there?
> > >
> > >C programs may end up generating extra warnings, but C++ programs may
> > >start to fail to compile.
> > >
> > >>Can/should we do that?
> > >
> > >I guess the question is what bugs we expect to uncover by eliciting
> > >additional compiler warnings and errors. If we expect these are being
> > >mis-used, it would be a good thing. However, if we just end up breaking
> > >a lot of otherwise correct code, it doesn't seem like a good plan.
> > 
> > I think adding const qualifiers to function parameters is generally 
> > safe.  But adding a const qualifier to a returned pointer might cause 
> > problems, as Keith alluded to.
> 
> Adding a const in a struct can also cause problems.
> (Modifying a return-type more often than not causes problems).

I wasn't aware that this type of changes would break C++ apps.
No go then.

Thanks for your answers,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070404/3c589ad8/attachment.pgp>


More information about the xorg mailing list