diff options
author | Princeton Ferro <princetonferro@gmail.com> | 2020-03-01 09:54:13 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-03-01 12:16:00 +0100 |
commit | aff7099d4a06c1022255cf85c5632e86ec9df1c9 (patch) | |
tree | 93107327aee1c63729865bb06c08fd00a23aab10 /compiler | |
parent | 2e4f82333078a5b099ee7acafb83fcbee2b1d18e (diff) | |
download | vala-aff7099d4a06c1022255cf85c5632e86ec9df1c9.tar.gz |
Add missing CodeContext.pop() calls
Release previously pushed CodeContext instances from static list.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/valacompiler.vala | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |