[vala/wip/effectfree] codegen: Use create_temp_value in copy_value of array module



commit 1c9c5b100af8caaa58e99bbfaf312ae2979212cb
Author: Luca Bruno <lucabru src gnome org>
Date:   Sun Jun 19 08:31:03 2011 +0200

    codegen: Use create_temp_value in copy_value of array module

 codegen/valaccodearraymodule.vala |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 0da3314..d143b20 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -407,17 +407,14 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
 				return base.copy_value (value, node);
 			}
 
-			var decl = get_temp_variable (type, false, node, false);
-			emit_temp_var (decl);
-
-			var ctemp = get_variable_cexpression (decl.name);
+			var temp_value = create_temp_value (type, false, node);
 
 			var copy_call = new CCodeFunctionCall (new CCodeIdentifier (generate_array_copy_wrapper (array_type)));
 			copy_call.add_argument (cexpr);
-			copy_call.add_argument (ctemp);
+			copy_call.add_argument (get_cvalue_ (temp_value));
 			ccode.add_expression (copy_call);
 
-			return new GLibValue (type, ctemp);
+			return temp_value;
 		} else {
 			return base.copy_value (value, node);
 		}



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