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
_______________________________________________
telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy

Reply via email to