[vala/staging] Add missing CodeContext.pop() calls
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] Add missing CodeContext.pop() calls
- Date: Sun, 1 Mar 2020 12:48:13 +0000 (UTC)
commit aff7099d4a06c1022255cf85c5632e86ec9df1c9
Author: Princeton Ferro <princetonferro gmail com>
Date: Sun Mar 1 09:54:13 2020 +0100
Add missing CodeContext.pop() calls
Release previously pushed CodeContext instances from static list.
compiler/valacompiler.vala | 3 +++
valadoc/treebuilder.vala | 2 ++
vapigen/valavapigen.vala | 2 ++
3 files changed, 7 insertions(+)
---
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index 3be65377b..e7f7db4ee 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -188,17 +188,20 @@ class Vala.Compiler {
private int quit () {
if (context.report.get_errors () == 0 && context.report.get_warnings () == 0) {
+ CodeContext.pop ();
return 0;
}
if (context.report.get_errors () == 0 && (!fatal_warnings || context.report.get_warnings ()
== 0)) {
if (!quiet_mode) {
stdout.printf ("Compilation succeeded - %d warning(s)\n",
context.report.get_warnings ());
}
+ CodeContext.pop ();
return 0;
} else {
if (!quiet_mode) {
stdout.printf ("Compilation failed: %d error(s), %d warning(s)\n",
context.report.get_errors (), context.report.get_warnings ());
}
+ CodeContext.pop ();
return 1;
}
}
diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala
index ed6dced10..e2175ac4a 100644
--- a/valadoc/treebuilder.vala
+++ b/valadoc/treebuilder.vala
@@ -1007,6 +1007,8 @@ public class Valadoc.TreeBuilder : Vala.CodeVisitor {
context.accept(this);
+ Vala.CodeContext.pop ();
+
return (reporter.errors == 0)? tree : null;
}
}
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index ef0b37200..d98318197 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -62,11 +62,13 @@ class Vala.VAPIGen {
if (!quiet_mode) {
stdout.printf ("Generation succeeded - %d warning(s)\n",
context.report.get_warnings ());
}
+ CodeContext.pop ();
return 0;
} else {
if (!quiet_mode) {
stdout.printf ("Generation failed: %d error(s), %d warning(s)\n",
context.report.get_errors (), context.report.get_warnings ());
}
+ CodeContext.pop ();
return 1;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]