/srv/mercurial-server/detachablepurple: 2a57f1bc754b: Fixed the ...

Gilles Bedel gillux at cpw.pidgin.im
Fri Jun 15 22:01:43 EDT 2012


Changeset: 2a57f1bc754bac9974c2160ba737085a8f9cd190
Author:	 Gilles Bedel <gillux at cpw.pidgin.im>
Date:	 2012-05-20 15:00 +0000
Branch:	 cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/2a57f1bc754b

Description:

Fixed the GVariant array builder initializers.
They are now able to build empty arrays,
because their type is fully defined.

diffstat:

 libpurple/dbus/constructor.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/libpurple/dbus/constructor.c b/libpurple/dbus/constructor.c
--- a/libpurple/dbus/constructor.c
+++ b/libpurple/dbus/constructor.c
@@ -204,7 +204,7 @@
 	PurpleObjectClass *pobjclass = PURPLE_OBJECT_GET_CLASS(pobject);
 	GType type;
 
-	g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+	g_variant_builder_init(&builder, (const GVariantType *) "a(sv)");
 
 	/* Step from the most derived type to PurpleObject's direct child
 	 * type and retreive each D-Bus property list. */
@@ -304,7 +304,7 @@
 	GList *all = purple_accounts_all();;
 
 	/* Pack every account into an array of accounts. */
-	g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
+	g_variant_builder_init(&builder, (const GVariantType *) "a(oa(sv))");
 	while (all) {
 		PurpleAccount *account = all->data;
 		g_variant_builder_add_value(&builder, pack_pobject(account));



More information about the Commits mailing list