[vala/staging] Revert "codegen: Use copies of error_variable of catch-clauses for nested usage"
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] Revert "codegen: Use copies of error_variable of catch-clauses for nested usage"
- Date: Mon, 21 Jan 2019 15:23:55 +0000 (UTC)
commit 23e0df7fc01ef019cabcc13ccb08b663e3c6fc51
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jan 21 16:03:14 2019 +0100
Revert "codegen: Use copies of error_variable of catch-clauses for nested usage"
This reverts commit 765c39c73c3096dd1de984db023763ec13448ef5.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/741
codegen/valagerrormodule.vala | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala
index c10826218..d29d09ca1 100644
--- a/codegen/valagerrormodule.vala
+++ b/codegen/valagerrormodule.vala
@@ -353,12 +353,8 @@ public class Vala.GErrorModule : CCodeDelegateModule {
ccode.open_block ();
if (clause.error_variable != null) {
- // use a copy for possible nested usage
- var error_variable = new LocalVariable (clause.error_type.copy (),
clause.variable_name);
- error_variable.active = true;
- error_variable.checked = true;
- visit_local_variable (error_variable);
- ccode.add_assignment (get_variable_cexpression (get_local_cname (error_variable)),
get_variable_cexpression ("_inner_error_"));
+ visit_local_variable (clause.error_variable);
+ ccode.add_assignment (get_variable_cexpression (get_local_cname
(clause.error_variable)), get_variable_cexpression ("_inner_error_"));
} else {
// error object is not used within catch statement, clear it
var cclear = new CCodeFunctionCall (new CCodeIdentifier ("g_clear_error"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]