Fix g_variant_get_gtype() deprecation message

Instead of:

warning: ‘g_variant_get_gtype’ is deprecated (declared at ../../gobject/glib-types.h:242): Use '((GType) ((21) << (2)))' instead [-Wdeprecated-declarations]

show:

warning: ‘g_variant_get_gtype’ is deprecated (declared at ../../gobject/glib-types.h:242): Use ''G_VARIANT_GET_TYPE'' instead [-Wdeprecated-declarations]

Also, document the macro-expansion problem in the
G_GNUC_DEPRECATED_FOR docs
This commit is contained in:
Dan Winship
2011-11-07 13:48:30 -05:00
parent 7d1c7af1a6
commit a5bf1c117b
2 changed files with 8 additions and 1 deletions

View File

@@ -284,6 +284,13 @@ new enough to support custom deprecation messages.
See the GNU C documentation for details.
</para>
<para>
Note that if <literal>f</literal> is a macro, it will be expanded in
the warning message. You can enclose it in quotes to prevent this.
(The quotes will show up in the warning, but it's better than showing
the macro expansion.)
</para>
@f: the intended replacement for the deprecated symbol, such as the name of a
function
@Since: 2.26