]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GVariant: Fix serialization of empty arrays
authorJürg Billeter <j@bitron.ch>
Wed, 6 Oct 2010 18:55:11 +0000 (20:55 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 8 Oct 2010 21:06:00 +0000 (23:06 +0200)
Fixes bug 631097.

codegen/valagvariantmodule.vala

index f7ae8c1071fbbf8142d1e8cb35fe358d10f5975f..64b653be9ecee8bb67c8dc7e19b89b00f7645a14 100644 (file)
@@ -625,7 +625,7 @@ public class Vala.GVariantModule : GAsyncModule {
 
                var builder_init = new CCodeFunctionCall (new CCodeIdentifier ("g_variant_builder_init"));
                builder_init.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (builder_name)));
-               builder_init.add_argument (new CCodeIdentifier ("G_VARIANT_TYPE_ARRAY"));
+               builder_init.add_argument (new CCodeConstant ("\"%s\"".printf (get_type_signature (array_type))));
                fragment.append (new CCodeExpressionStatement (builder_init));
 
                var cforblock = new CCodeBlock ();