skip memory manager for VAPI files remove unnecessary code in
authorJuerg Billeter <j@bitron.ch>
Tue, 24 Jul 2007 15:38:41 +0000 (15:38 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 24 Jul 2007 15:38:41 +0000 (15:38 +0000)
2007-07-24  Juerg Billeter  <j@bitron.ch>

* vala/valamemorymanager.vala: skip memory manager for VAPI files
* vala/valasemanticanalyzer.vala: remove unnecessary code in
  visit_creation_method

svn path=/trunk/; revision=382

ChangeLog
vala/valamemorymanager.vala
vala/valasemanticanalyzer.vala

index beda221..485c254 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-07-24  Jürg Billeter  <j@bitron.ch>
 
+       * vala/valamemorymanager.vala: skip memory manager for VAPI files
+       * vala/valasemanticanalyzer.vala: remove unnecessary code in
+         visit_creation_method
+
+2007-07-24  Jürg Billeter  <j@bitron.ch>
+
        * gobject/valaccodecompiler.vala, compiler/valacompiler.vala: add --cc
          and -X options to be able to specify custom command and options for
          the C compiler
index b580ce2..ab4f776 100644 (file)
@@ -62,7 +62,9 @@ public class Vala.MemoryManager : CodeVisitor {
        }
 
        public override void visit_source_file (SourceFile! source_file) {
-               source_file.accept_children (this);
+               if (!source_file.pkg) {
+                       source_file.accept_children (this);
+               }
        }
 
        public override void visit_class (Class! cl) {
index 58c9998..ea7b1b2 100644 (file)
@@ -448,21 +448,9 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        current_return_type = up_method.return_type;
                }
 
-               if (current_symbol is Class) {
-                       if (!(m is CreationMethod)) {
-                               find_base_interface_method (m, (Class) current_symbol);
-                               if (m.is_virtual || m.overrides) {
-                                       find_base_class_method (m, (Class) current_symbol);
-                                       if (m.base_method == null) {
-                                               Report.error (m.source_reference, "%s: no suitable method found to override".printf (m.get_full_name ()));
-                                       }
-                               }
-                       }
-               } else if (current_symbol is Struct) {
-                       if (m.is_abstract || m.is_virtual || m.overrides) {
-                               Report.error (m.source_reference, "A struct member `%s' cannot be marked as override, virtual, or abstract".printf (m.get_full_name ()));
-                               return;
-                       }
+               if (m.is_abstract || m.is_virtual || m.overrides) {
+                       Report.error (m.source_reference, "The creation method `%s' cannot be marked as override, virtual, or abstract".printf (m.get_full_name ()));
+                       return;
                }
 
                if (m.body != null && current_class != null) {