[Bug 77773] TpHandleSet: supersede GArray<guint32> functions with GVariant<"au"> versions

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 15 02:56:45 PDT 2014


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

--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
Comment on attachment 99069
  --> https://bugs.freedesktop.org/attachment.cgi?id=99069
add tp_intset_to_variant()

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

::: telepathy-glib/intset.c
@@ +395,5 @@
> + *
> + * <!--Returns: says it all-->
> + *
> + * Returns: (transfer full): a new #GVariant of type 'au'
> + *  containing the same integers as @set.

It looks as though you're returning a new *floating* GVariant. Please document
that explicitly in the text, and I think (transfer none) is the correct
annotation (check e.g. g_variant_new_uint32() docs if unsure, it should match).

"of type 'au' (array of uint32)" might be clearer.

::: tests/intset.c
@@ +204,5 @@
> +    GVariant *v;
> +
> +    v = tp_intset_to_variant (a);
> +    g_assert (g_variant_is_of_type (v, G_VARIANT_TYPE ("au")));
> +    g_variant_unref (v);

I'd prefer to g_variant_ref_sink() it before the assertion.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list