[vala/wip/transform: 30/93] Let the transformer handle recursive transformations
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/transform: 30/93] Let the transformer handle recursive transformations
- Date: Sun, 28 Oct 2018 15:51:31 +0000 (UTC)
commit 9ea047a678b5d916eb9bc43b0896d028e0b4a7ac
Author: Luca Bruno <lucabru src gnome org>
Date: Tue Jan 3 13:09:20 2012 +0100
Let the transformer handle recursive transformations
codegen/valagvarianttransformer.vala | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valagvarianttransformer.vala b/codegen/valagvarianttransformer.vala
index 7d9b8a6ab..cc602f406 100644
--- a/codegen/valagvarianttransformer.vala
+++ b/codegen/valagvarianttransformer.vala
@@ -227,7 +227,7 @@ public class Vala.GVariantTransformer : CodeTransformer {
for (int i=0; i < dim; i++) {
element_expr.append_index (expression (indices[i]));
}
- element_variant = serialize_expression (copy_type (array_type.element_type, false),
element_expr);
+ element_variant = element_expr;
}
var builder_add = (MethodCall) expression (builder+".add_value ()");
@@ -264,10 +264,7 @@ public class Vala.GVariantTransformer : CodeTransformer {
continue;
}
- var serialized_field = serialize_expression (copy_type (f.variable_type,
false), expression (@"st.$(f.name)"));
- MethodCall call = (MethodCall) expression (@"$builder.add_value ()");
- call.add_argument (serialized_field);
- b.add_expression (call);
+ b.add_expression (expression (@"$builder.add_value (st.$(f.name))"));
}
b.add_return (expression (@"$builder.end ()"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]