From 99782178ec1dd28cb8733d2ff884dfc4b222d7a0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 26 Sep 2013 14:23:21 +0100 Subject: [PATCH 2/7] glib-client-gen.py: ignore GValueArray deprecation warnings Yes we know we have GValueArrays. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69849 --- tools/glib-client-gen.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py index e68e1a5..7d67c71 100644 --- a/tools/glib-client-gen.py +++ b/tools/glib-client-gen.py @@ -186,6 +186,7 @@ class Generator(object): self.b(' TpProxySignalConnection *sc)') self.b('{') + self.b(' G_GNUC_BEGIN_IGNORE_DEPRECATIONS') self.b(' GValueArray *args = g_value_array_new (%d);' % len(args)) self.b(' GValue blank = { 0 };') self.b(' guint i;') @@ -194,6 +195,7 @@ class Generator(object): self.b('') self.b(' for (i = 0; i < %d; i++)' % len(args)) self.b(' g_value_array_append (args, &blank);') + self.b(' G_GNUC_END_IGNORE_DEPRECATIONS') self.b('') for i, arg in enumerate(args): @@ -282,12 +284,14 @@ class Generator(object): self.b(' weak_object);') self.b('') + self.b(' G_GNUC_BEGIN_IGNORE_DEPRECATIONS') if len(args) > 0: self.b(' g_value_array_free (args);') else: self.b(' if (args != NULL)') self.b(' g_value_array_free (args);') self.b('') + self.b(' G_GNUC_END_IGNORE_DEPRECATIONS') self.b(' g_object_unref (tpproxy);') self.b('}') @@ -553,11 +557,13 @@ class Generator(object): self.b(' return;') self.b(' }') self.b('') + self.b(' G_GNUC_BEGIN_IGNORE_DEPRECATIONS') self.b(' args = g_value_array_new (%d);' % len(out_args)) self.b(' g_value_init (&blank, G_TYPE_INT);') self.b('') self.b(' for (i = 0; i < %d; i++)' % len(out_args)) self.b(' g_value_array_append (args, &blank);') + self.b(' G_GNUC_END_IGNORE_DEPRECATIONS') for i, arg in enumerate(out_args): name, info, tp_type, elt = arg @@ -665,11 +671,13 @@ class Generator(object): self.b(' error, user_data, weak_object);') self.b('') + self.b(' G_GNUC_BEGIN_IGNORE_DEPRECATIONS') if len(out_args) > 0: self.b(' g_value_array_free (args);') else: self.b(' if (args != NULL)') self.b(' g_value_array_free (args);') + self.b(' G_GNUC_END_IGNORE_DEPRECATIONS') self.b('}') self.b('') @@ -942,11 +950,13 @@ class Generator(object): self.b('') + self.b(' G_GNUC_BEGIN_IGNORE_DEPRECATIONS') if len(out_args) > 0: self.b(' g_value_array_free (args);') else: self.b(' if (args != NULL)') self.b(' g_value_array_free (args);') + self.b(' G_GNUC_END_IGNORE_DEPRECATIONS') self.b('}') self.b('') -- 1.8.4.rc3