Re: Deprecation and GSEAL
- From: Cody Russell <bratsche gnome org>
- To: Simon McVittie <simon mcvittie collabora co uk>
- Cc: gtk-devel-list gnome org
- Subject: Re: Deprecation and GSEAL
- Date: Thu, 16 Apr 2009 14:20:56 -0400
On Thu, 2009-04-16 at 18:33 +0100, Simon McVittie wrote:
> GLib defines G_GNUC_DEPRECATED, which expands to
> in gcc versions that support it.
Oh, awesome. I don't think I ever noticed this before. Maybe because
it looks like it's never used anywhere.
So here is an amended version that includes this, and also at timj's
suggestion has another preprocessor check for "GSEAL_NO_ERRORS". So
with this you would need to -DGSEAL_ENABLE -DGSEAL_NO_ERRORS to get
warnings instead of errors.
/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to
modify GLib */
# ifdef GSEAL_ENABLE
# ifdef GSEAL_NO_ERRORS
# define GSEAL(ident) G_GNUC_DEPRECATED ident
# define GSEAL(ident) _g_sealed__ ## ident
# define GSEAL(ident) ident
#endif /* !GSEAL */
] [Thread Prev