[vala/wip/effectfree: 27/39] codegen: Use create_temp_value in handle_struct_argument



commit e825ffd3db6a60a8e06e96ee42978f24d6d8f274
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Jun 14 11:35:58 2011 +0200

    codegen: Use create_temp_value in handle_struct_argument

 codegen/valaccodebasemodule.vala |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 95c1441..22fe6b6 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4357,11 +4357,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 					return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, cexpr);
 				} else {
 					// if cexpr is e.g. a function call, we can't take the address of the expression
-					var temp_var = get_temp_variable (type, true, null, false);
-					emit_temp_var (temp_var);
-
-					ccode.add_assignment (get_variable_cexpression (temp_var.name), cexpr);
-					return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_variable_cexpression (temp_var.name));
+					var temp_value = create_temp_value (type, false, arg);
+					ccode.add_assignment (get_cvalue_ (temp_value), cexpr);
+					return new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_cvalue_ (temp_value));
 				}
 			}
 		}



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