[Telepathy] dbus-glib GValue to GVariant

Will Thompson will.thompson at collabora.co.uk
Thu Jun 24 03:17:00 PDT 2010


On 22/06/10 04:16, Danielle Madeley wrote:
> I've written a proof of concept of this: g_value_to_g_variant (attached)

Looks nice to me. I think it leaks when it recurses, though: you free 
the GPtrArray of children, but don't unref the GVariants. Probably just 
a matter of g_ptr_array_new_with_free_func ((GDestroyNotify) 
g_variant_unref);.

> I figure this sort of thing can be provided as a utility function that
> we can then use in tp-glib to make binding-friendly API. It also may
> well ease the transition from dbus-glib to gdbus for some people.
> Possibly it should be provided by dbus-glib? Thoughts?

I guess the only reason for it not to live in dbus-glib would be not 
wanting it to depend on modernish glib. But otherwise I don't see why 
dbus-gtype-specialized.h shouldn't grow this as 
dbus_g_value_build_g_variant () or similar. I could see it being useful 
in more libraries than just tp-glib.

-- 
Will


More information about the telepathy mailing list