[vala/temp: 4/5] codegen: Get the instance using get_local_cvalue for object creation



commit 95cc8a6df9e298c83298670e0d2fd809ba3ee7dd
Author: Luca Bruno <lucabru src gnome org>
Date:   Sun May 8 15:43:24 2011 +0200

    codegen: Get the instance using get_local_cvalue for object creation

 codegen/valaccodebasemodule.vala |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 0bf8a01..062613d 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4017,12 +4017,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
 			var local = expr.parent_node as LocalVariable;
 			if (local != null && has_simple_struct_initializer (local)) {
-				if (local.captured) {
-					var block = (Block) local.parent_symbol;
-					instance = new CCodeMemberAccess.pointer (get_variable_cexpression ("_data%d_".printf (get_block_id (block))), get_variable_cname (local.name));
-				} else {
-					instance = get_variable_cexpression (get_variable_cname (local.name));
-				}
+				instance = get_cvalue_ (get_local_cvalue (local));
 			} else {
 				var temp_decl = get_temp_variable (expr.type_reference, false, expr);
 				emit_temp_var (temp_decl);



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