summaryrefslogtreecommitdiff
path: root/gobject
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-02-10 08:49:17 -0500
committerDan Winship <danw@gnome.org>2012-02-15 09:54:38 -0500
commitca05902a5883020add334e542a63d7f9381a3117 (patch)
tree961b8275bbe6b104dd06e885a11ac0e03f25abf7 /gobject
parentab59739e1177d463fc7577def059deb0179662cc (diff)
downloadglib-ca05902a5883020add334e542a63d7f9381a3117.tar.gz
Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add new macros to disable -Wdeprecated-declarations around a piece of code, using the C99 (and GNU89) _Pragma() operator. Replace the existing use of #pragma for this in gio, and suppress the warnings in gvaluearray.c as well. https://bugzilla.gnome.org/show_bug.cgi?id=669671
Diffstat (limited to 'gobject')
-rw-r--r--gobject/gvaluearray.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c
index 39c9c015b..db6c71901 100644
--- a/gobject/gvaluearray.c
+++ b/gobject/gvaluearray.c
@@ -228,7 +228,9 @@ g_value_array_prepend (GValueArray *value_array,
{
g_return_val_if_fail (value_array != NULL, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_value_array_insert (value_array, 0, value);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -249,7 +251,9 @@ g_value_array_append (GValueArray *value_array,
{
g_return_val_if_fail (value_array != NULL, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_value_array_insert (value_array, value_array->n_values, value);
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
/**