[vala/wip/effectfree: 40/44] codegen: Use create_temp_value in try_cast_variant_to_type



commit 4465d96bf84562330ff665557c7d0eac654d0f67
Author: Luca Bruno <lucabru src gnome org>
Date:   Sun Jun 19 08:36:42 2011 +0200

    codegen: Use create_temp_value in try_cast_variant_to_type

 codegen/valaccodebasemodule.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 02daf58..27bd99c 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4491,12 +4491,11 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 			var array_type = (ArrayType) to;
 
 			for (int dim = 1; dim <= array_type.rank; dim++) {
-				var temp_decl = get_temp_variable (int_type, false, expr);
-				emit_temp_var (temp_decl);
+				var temp_value = create_temp_value (int_type, true, expr);
 
-				ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_decl.name)));
+				ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue_ (temp_value)));
 				cfunc.add_parameter (new CCodeParameter (get_array_length_cname ("result", dim), "int*"));
-				append_array_length (expr, get_variable_cexpression (temp_decl.name));
+				append_array_length (expr, get_cvalue_ (temp_value));
 			}
 		}
 



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