[vala/wip/emitlocal: 12/17] codegen: Use create_temp_value in handle_struct_argument



commit 18aa5ec79e4e7df5ed28fd85a5bd47d135723f3f
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 8a9070d..9310747 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4373,11 +4373,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]