]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
transformer: Clear wrapper cache for every file
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 25 Oct 2012 18:32:48 +0000 (20:32 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 11 Mar 2019 12:52:38 +0000 (13:52 +0100)
codegen/valaccodetransformer.vala
vala/valacodetransformer.vala

index 8af5ee62ee88424ba2b7ac0c08f1f744d5366350..6f004c46f50d85d04b22acfd4ee71a19fcefbc84 100644 (file)
@@ -28,10 +28,6 @@ public class Vala.CCodeTransformer : CodeTransformer {
                source_file.accept_children (this);
        }
 
-       public override void visit_namespace (Namespace ns) {
-               ns.accept_children (this);
-       }
-
        public override void visit_class (Class cl) {
                cl.accept_children (this);
        }
index 8ff5b80821313b9585be6fb0f880104766046aff..8773d515177eda3bc87c56e0f119ee53075c48e9 100644 (file)
@@ -28,7 +28,7 @@ public class Vala.CodeTransformer : CodeVisitor {
 
        public CodeBuilder b;
        public ArrayList<CodeBuilder> builder_stack = new ArrayList<CodeBuilder> ();
-       public HashMap<string, CodeNode> wrapper_cache = new HashMap<string, CodeNode> (str_hash, str_equal);
+       public HashMap<string, CodeNode> wrapper_cache;
 
        public void push_builder (CodeBuilder builder) {
                builder_stack.add (b);
@@ -47,12 +47,13 @@ public class Vala.CodeTransformer : CodeVisitor {
         */
        public void transform (CodeContext context) {
                this.context = context;
-
                /* we're only interested in non-pkg source files */
                var source_files = context.get_source_files ();
                foreach (SourceFile file in source_files) {
                        if (file.file_type == SourceFileType.SOURCE ||
                            (context.header_filename != null && file.file_type == SourceFileType.FAST)) {
+                               /* clear wrapper cache for every file */
+                               wrapper_cache = new HashMap<string, CodeNode> (str_hash, str_equal);
                                file.accept (this);
                        }
                }