[vala/wip/effectfree: 32/43] 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: 32/43] codegen: Use create_temp_value in handle_struct_argument
- Date: Tue, 5 Jul 2011 21:55:16 +0000 (UTC)
commit c1a44b216573d872fbbaa3c82575e6008f1b2608
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 70d37b2..fdcb177 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4367,11 +4367,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]