[RFC] server-private and public header separation

Rémi Cardona remi at gentoo.org
Sun Apr 8 02:16:47 PDT 2012


Hi all,

Sorry for being late to the party.

Le 24/03/2012 13:36, Mark Kettenis a écrit :
> * Rename the private members such that it is obvious they are private.
>   My suggestion would be to prepend them with an underscore.  You
>   could then could provide #defines to map them to their old name
>   wrapped in an #ifdef __XSERVER__ block if you want to avoid making
>   changes the server code.

Gtk+ 2 uses the following trick to do just that and have the compiler
help enforce it:

http://git.gnome.org/browse/gtk+/tree/configure.in?h=gtk-2-24#n1637

Which is then used like so:

http://git.gnome.org/browse/gtk+/tree/gtk/gtkhandlebox.h?h=gtk-2-24#n56

There are also new macros in gtk+ 3 for deprecations...

Cheers,

Rémi


More information about the xorg-devel mailing list