[vala/staging] codegen: Avoid use of temp-var to access in/ref parameters
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Avoid use of temp-var to access in/ref parameters
- Date: Tue, 21 Nov 2017 20:32:15 +0000 (UTC)
commit 58330ecec5b336e4c588020887ad81ff8fd38278
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Nov 21 21:21:48 2017 +0100
codegen: Avoid use of temp-var to access in/ref parameters
https://bugzilla.gnome.org/show_bug.cgi?id=789071
codegen/valaccodememberaccessmodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 6bb5cb2..317a545 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -734,7 +734,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
// special handling for types such as va_list
use_temp = false;
}
- if (variable is Parameter && variable.name == "this") {
+ if (variable is Parameter && (variable.name == "this" || ((Parameter) variable).direction !=
ParameterDirection.OUT)) {
use_temp = false;
}
if (variable.single_assignment && !result.value_type.is_real_non_null_struct_type ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]