[Bug 30422] Provide GVariant-based access to all a{sv} things

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 30 15:20:06 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=30422

--- Comment #42 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-04-30 06:20:06 PDT ---
Comment on attachment 60785
  --> https://bugs.freedesktop.org/attachment.cgi?id=60785
Add tp_capabilities_dup_channel_classes_variant()

Review of attachment 60785:
 --> (https://bugs.freedesktop.org/page.cgi?id=splinter.html&bug=30422&attachment=60785)
-----------------------------------------------------------------

Minor fixes needed. (It would be great if you could valgrind the test to see
whether I missed anything.)

::: telepathy-glib/capabilities.c
@@ +183,5 @@
>      case PROP_CHANNEL_CLASSES:
>        self->priv->classes = g_value_dup_boxed (value);
> +      self->priv->classes_variant = _tp_boxed_to_variant (
> +          TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST, "a(a{sv}as)",
> +          self->priv->classes);

You don't appear to free this in dispose/finalize?

@@ +901,5 @@
> + * @self: a #TpCapabilities
> + *
> + * Return the #TpCapabilities:channel-classes-variant property
> + *
> + * Returns: (transfer full): the value of

the value of the

::: tests/capabilities.c
@@ +1006,5 @@
> +      TP_PROP_CHANNEL_CHANNEL_TYPE, "&s", &chan_type));
> +  g_assert_cmpstr (chan_type, ==, TP_IFACE_CHANNEL_TYPE_TEXT);
> +
> +  g_assert (g_variant_lookup (fixed,
> +      TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, "u", &handle_type));

A common GVariant trap: handle_type should be a guint32, not a TpHandleType
(which we assume is the same size as a guint). guint is not necessarily 32-bit
forever.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list