]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Fix memory management of interfaces
authorJürg Billeter <j@bitron.ch>
Thu, 18 Feb 2010 07:32:56 +0000 (08:32 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 5 Jun 2010 08:12:10 +0000 (10:12 +0200)
Fixes bug 609089.

vala/valasymbolresolver.vala

index 15e63821f4c2ce28d04a38ef2354af4d965b16c9..d5adcd3444cd4bce32ce912e31d2af2c1ea128a0 100644 (file)
@@ -120,6 +120,14 @@ public class Vala.SymbolResolver : CodeVisitor {
                        }
                }
 
+               if (context.profile == Profile.DOVA) {
+                       // all interfaces require Object
+                       if (iface.get_prerequisites ().size == 0) {
+                               var object_class = (Class) root_symbol.scope.lookup ("Dova").scope.lookup ("Object");
+                               iface.add_prerequisite (new ObjectType (object_class));
+                       }
+               }
+
                current_scope = current_scope.parent_scope;
        }