[Bug 55096] Provide GVariant-based access to TpMessage

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 26 13:21:58 CEST 2012


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

--- Comment #3 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> ---
Comment on attachment 67390
  --> https://bugs.freedesktop.org/attachment.cgi?id=67390
tp_message_dup_part: add

Review of attachment 67390:
-----------------------------------------------------------------

::: tests/dbus/cm-message.c
@@ +96,5 @@
>        "Badger");
>  
> +  part_vardict = tp_message_dup_part (msg, 1);
> +  g_assert_cmpstr (g_variant_get_type_string (part_vardict), ==, "a{sv}");
> +  valid = g_variant_lookup (part_vardict, "content-type", "s", &s);

you have to use "&s" as type if you don't want g_value_lookup() to copy the
string for you.

@@ +99,5 @@
> +  g_assert_cmpstr (g_variant_get_type_string (part_vardict), ==, "a{sv}");
> +  valid = g_variant_lookup (part_vardict, "content-type", "s", &s);
> +  g_assert (valid);
> +  g_assert_cmpstr (s, ==, "text/plain");
> +  valid = g_variant_lookup (part_vardict, "content", "s", &s);

same here.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/telepathy-bugs/attachments/20120926/8ecd38a1/attachment.html>


More information about the telepathy-bugs mailing list