]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add missing CodeContext.pop() calls
authorPrinceton Ferro <princetonferro@gmail.com>
Sun, 1 Mar 2020 08:54:13 +0000 (09:54 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 1 Mar 2020 11:16:00 +0000 (12:16 +0100)
Release previously pushed CodeContext instances from static list.

compiler/valacompiler.vala
valadoc/treebuilder.vala
vapigen/valavapigen.vala

index 3be65377b08b5b49c1b45fc94c55719bb33aadcd..e7f7db4ee159ee646cf3a411f94251d9d9bc5fe2 100644 (file)
@@ -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;
                }
        }
index ed6dced103cf762c30477cb96449afcbcf61c67d..e2175ac4ab08b89d9353dd9266ea51ab7a160809 100644 (file)
@@ -1007,6 +1007,8 @@ public class Valadoc.TreeBuilder : Vala.CodeVisitor {
 
                context.accept(this);
 
+               Vala.CodeContext.pop ();
+
                return (reporter.errors == 0)? tree : null;
        }
 }
index ef0b372006f6772be916b77728e88f4f40aeb48a..d983181976611fa41fb55238218571cd864f9423 100644 (file)
@@ -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;
                }
        }