[next] telepathy-glib: Use concrete dbus-glib parameterized types, not G_TYPE_VALUE_ARRAY

Simon McVittie smcv at kemper.freedesktop.org
Thu Mar 13 07:08:35 PDT 2014


Module: telepathy-glib
Branch: next
Commit: f29745229b414de9e7dd1030ee043c7081c1d74a
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=f29745229b414de9e7dd1030ee043c7081c1d74a

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Mar 10 18:23:09 2014 +0000

Use concrete dbus-glib parameterized types, not G_TYPE_VALUE_ARRAY

dbus_g_value_build_g_variant() doesn't yet understand how to build a
tuple from a G_TYPE_VALUE_ARRAY, so my branch to use GDBus for
everything will rely on using the full parameterized types.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76000
Reviewed-by: Guillaume Desmottes

---

 telepathy-glib/presence-mixin.c      |    6 +-----
 tests/lib/broken-client-types-conn.c |    6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index c17dc8a..8b157e3 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -925,15 +925,11 @@ tp_presence_mixin_fill_contact_attributes (GObject *obj,
     }
   else
     {
-      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-      GType type = G_TYPE_VALUE_ARRAY;
-      G_GNUC_END_IGNORE_DEPRECATIONS
-
       presence = construct_presence_value_array (status, mixin_cls->statuses);
       tp_presence_status_free (status);
       tp_contact_attribute_map_take_sliced_gvalue (attributes, contact,
           TP_TOKEN_CONNECTION_INTERFACE_PRESENCE1_PRESENCE,
-          tp_g_value_slice_new_take_boxed (type, presence));
+          tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE, presence));
     }
   return TRUE;
 }
diff --git a/tests/lib/broken-client-types-conn.c b/tests/lib/broken-client-types-conn.c
index 6148f37..7bdc766 100644
--- a/tests/lib/broken-client-types-conn.c
+++ b/tests/lib/broken-client-types-conn.c
@@ -35,10 +35,6 @@ fill_contact_attributes (TpBaseConnection *base,
     TpHandle contact,
     TpContactAttributeMap *attributes)
 {
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  GType type = G_TYPE_VALUE_ARRAY;
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
   if (!tp_strdiff (dbus_interface,
         TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES1))
     {
@@ -52,7 +48,7 @@ fill_contact_attributes (TpBaseConnection *base,
       tp_contact_attribute_map_take_sliced_gvalue (attributes,
           contact,
           TP_TOKEN_CONNECTION_INTERFACE_PRESENCE1_PRESENCE,
-          tp_g_value_slice_new_take_boxed (type, presence));
+          tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE, presence));
     }
 }
 



More information about the telepathy-commits mailing list