[vala/wip/effectfree: 28/33] codegen: Use create_temp_value in handle_struct_argument
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/effectfree: 28/33] codegen: Use create_temp_value in handle_struct_argument
- Date: Sat, 18 Jun 2011 14:34:19 +0000 (UTC)
commit 35c3e162380bc9a60c6036d4deb087b9c4cc8caf
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 8545412..6707975 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4338,11 +4338,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]