[vala] GVariant: Fix serialization of empty arrays



commit 1acf0768a3f384f2e657d0ab77c1c75f0cb909db
Author: Jürg Billeter <j bitron ch>
Date:   Wed Oct 6 20:55:11 2010 +0200

    GVariant: Fix serialization of empty arrays
    
    Fixes bug 631097.

 codegen/valagvariantmodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala
index 91a9c00..859c474 100644
--- a/codegen/valagvariantmodule.vala
+++ b/codegen/valagvariantmodule.vala
@@ -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 ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]