]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
don't implicitly derive from GLib.Object in preparation for a more
authorJuerg Billeter <j@bitron.ch>
Thu, 30 Aug 2007 12:33:40 +0000 (12:33 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 30 Aug 2007 12:33:40 +0000 (12:33 +0000)
2007-08-30  Juerg Billeter  <j@bitron.ch>

* vala/valasymbolresolver.vala, vala/valasemanticanalyzer.vala,
  gobject/valacodegenerator.vala, gobject/valacodegeneratorclass.vala:
  don't implicitly derive from GLib.Object in preparation for a more
  consistent type system

* gee/arraylist.vala, gee/hashmap.vala, gee/hashset.vala,
  gee/iterable.vala, gee/iterator.vala, gee/list.vala, gee/map.vala,
  gee/readonlycollection.vala, gee/readonlylist.vala,
  gee/readonlymap.vala, gee/readonlyset.vala,
  vala/valabindingprovider.vala, vala/valacodecontext.vala,
  vala/valacodenode.vala, vala/valacodevisitor.vala,
  vala/valascope.vala, vala/valasourcefile.vala,
  vala/valasourcefilecycle.vala, vala/valasourcereference.vala,
  ccode/valaccodenode.vala, ccode/valaccodewriter.vala,
  gobject/valaccodecompiler.vala, gobject/valadbusbindingprovider.vala,
  gobject/valatyperegisterfunction.vala, compiler/valacompiler.vala,
  tests/, vapigen/valavapigen.vala: derive all classes from GLib.Object

svn path=/trunk/; revision=536

66 files changed:
ChangeLog
ccode/valaccodenode.vala
ccode/valaccodewriter.vala
compiler/valacompiler.vala
gee/arraylist.vala
gee/hashmap.vala
gee/hashset.vala
gee/iterable.vala
gee/iterator.vala
gee/list.vala
gee/map.vala
gee/readonlycollection.vala
gee/readonlylist.vala
gee/readonlymap.vala
gee/readonlyset.vala
gobject/valaccodecompiler.vala
gobject/valacodegenerator.vala
gobject/valacodegeneratorclass.vala
gobject/valadbusbindingprovider.vala
gobject/valatyperegisterfunction.vala
tests/test-002.vala
tests/test-003.vala
tests/test-004.vala
tests/test-005.vala
tests/test-006.vala
tests/test-007.vala
tests/test-008.vala
tests/test-009.vala
tests/test-010.vala
tests/test-011.vala
tests/test-012.vala
tests/test-013.vala
tests/test-014.vala
tests/test-015.vala
tests/test-016.vala
tests/test-017.vala
tests/test-018.vala
tests/test-019.vala
tests/test-020.vala
tests/test-021.vala
tests/test-022.vala
tests/test-023.vala
tests/test-024.vala
tests/test-025.vala
tests/test-026.vala
tests/test-027.vala
tests/test-028.vala
tests/test-029.vala
tests/test-030.vala
tests/test-031.vala
tests/test-032.vala
tests/test-033.vala
tests/test-034.vala
tests/test-035.vala
tests/testenchant.vala
vala/valabindingprovider.vala
vala/valacodecontext.vala
vala/valacodenode.vala
vala/valacodevisitor.vala
vala/valascope.vala
vala/valasemanticanalyzer.vala
vala/valasourcefile.vala
vala/valasourcefilecycle.vala
vala/valasourcereference.vala
vala/valasymbolresolver.vala
vapigen/valavapigen.vala

index 945ec2f29c7f5ba3938e824116fe4436d0844b84..f799ebac1ed3d519a5b220f4caaa396b6fd388ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2007-08-30  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valasymbolresolver.vala, vala/valasemanticanalyzer.vala,
+         gobject/valacodegenerator.vala, gobject/valacodegeneratorclass.vala:
+         don't implicitly derive from GLib.Object in preparation for a more
+         consistent type system
+
+       * gee/arraylist.vala, gee/hashmap.vala, gee/hashset.vala,
+         gee/iterable.vala, gee/iterator.vala, gee/list.vala, gee/map.vala,
+         gee/readonlycollection.vala, gee/readonlylist.vala,
+         gee/readonlymap.vala, gee/readonlyset.vala,
+         vala/valabindingprovider.vala, vala/valacodecontext.vala,
+         vala/valacodenode.vala, vala/valacodevisitor.vala,
+         vala/valascope.vala, vala/valasourcefile.vala,
+         vala/valasourcefilecycle.vala, vala/valasourcereference.vala,
+         ccode/valaccodenode.vala, ccode/valaccodewriter.vala,
+         gobject/valaccodecompiler.vala, gobject/valadbusbindingprovider.vala,
+         gobject/valatyperegisterfunction.vala, compiler/valacompiler.vala,
+         tests/, vapigen/valavapigen.vala: derive all classes from GLib.Object
+
 2007-08-30  Jürg Billeter  <j@bitron.ch>
 
        * vapi/libnotify.deps: add missing file
index 18240a697406c7ee46df5b4d3d474dea34917ca7..81f1136b6b4dcf8d12e7bfacf3a878796273da5f 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a node in the C code tree.
  */
-public abstract class Vala.CCodeNode {
+public abstract class Vala.CCodeNode : Object {
        /**
         * The source file name and line number to be presumed for this code
         * node.
index 3e33359c161d32f93101bac53ea7399c0a85a87c..3393983cc3a5de7981f88609ad43969528a30ba0 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a writer to write C source files.
  */
-public class Vala.CCodeWriter {
+public class Vala.CCodeWriter : Object {
        /**
         * Specifies the file to be written.
         */
index 40a25ee3ccbca0faf2cb9e146d56b883a0203ab4..93ac87802aa1c2ad5c4f3d7d2af7dfb88c5dbb6f 100644 (file)
@@ -22,7 +22,7 @@
 
 using GLib;
 
-class Vala.Compiler {
+class Vala.Compiler : Object {
        static string directory;
        static bool version;
        [NoArrayLength ()]
index 9853bfd6cb0dc2d2f82bc2339a422091c644d524..2be04f226cccba530b992ee1ad36231eca2b7847 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Arrays of arbitrary elements which grow automatically as elements are added.
  */
-public class Gee.ArrayList<G> : Iterable<G>, Collection<G>, List<G> {
+public class Gee.ArrayList<G> : Object, Iterable<G>, Collection<G>, List<G> {
        public int size {
                get { return _size; }
        }
@@ -147,7 +147,7 @@ public class Gee.ArrayList<G> : Iterable<G>, Collection<G>, List<G> {
                _items.resize (value);
        }
 
-       private class Iterator<G> : Gee.Iterator<G> {
+       private class Iterator<G> : Object, Gee.Iterator<G> {
                public ArrayList<G> list {
                        set {
                                _list = value;
index 890bc7ad967f34e6caf257f8fad89e3932d78e82..89abb932e337cbaa5eefc96a684f756467bdb1f1 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Hashtable implementation of the Map interface.
  */
-public class Gee.HashMap<K,V> : Map<K,V> {
+public class Gee.HashMap<K,V> : Object, Map<K,V> {
        public int size {
                get { return _nnodes; }
        }
@@ -179,7 +179,7 @@ public class Gee.HashMap<K,V> : Map<K,V> {
                }
        }
 
-       private class KeySet<K,V> : Iterable<K>, Collection<K>, Set<K> {
+       private class KeySet<K,V> : Object, Iterable<K>, Collection<K>, Set<K> {
                public HashMap<K,V> map {
                        set { _map = value; }
                }
@@ -216,7 +216,7 @@ public class Gee.HashMap<K,V> : Map<K,V> {
                }
        }
 
-       private class KeyIterator<K,V> : Iterator<K> {
+       private class KeyIterator<K,V> : Object, Iterator<K> {
                public HashMap<K,V> map {
                        set {
                                _map = value;
@@ -252,7 +252,7 @@ public class Gee.HashMap<K,V> : Map<K,V> {
                }
        }
 
-       private class ValueCollection<K,V> : Iterable<V>, Collection<V> {
+       private class ValueCollection<K,V> : Object, Iterable<V>, Collection<V> {
                public HashMap<K,V> map {
                        set { _map = value; }
                }
@@ -293,7 +293,7 @@ public class Gee.HashMap<K,V> : Map<K,V> {
                }
        }
 
-       private class ValueIterator<K,V> : Iterator<V> {
+       private class ValueIterator<K,V> : Object, Iterator<V> {
                public HashMap<K,V> map {
                        set {
                                _map = value;
index f0bb5f46a79fd7b8844d0ade8f8c21d58ca04d50..c053a1c82c2ad02bca8c94c721f7fa9757b043bd 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
 /**
  * Hashtable implementation of the Set interface.
  */
-public class Gee.HashSet<G> : Iterable<G>, Collection<G>, Set<G> {
+public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
        public int size {
                get { return _nnodes; }
        }
@@ -158,7 +158,7 @@ public class Gee.HashSet<G> : Iterable<G>, Collection<G>, Set<G> {
                }
        }
 
-       private class Iterator<G> : Gee.Iterator<G> {
+       private class Iterator<G> : Object, Gee.Iterator<G> {
                public HashSet<G> set {
                        set {
                                _set = value;
index 1b3e66dd7fd5dfadd4afb132d32d8bd61a084ce0..cb29c6619a77eaba97594b47bc2eee946f27bef6 100644 (file)
@@ -24,7 +24,7 @@
  * Implemented by classes that support a simple iteration over instances of the
  * collection.
  */
-public interface Gee.Iterable<G> {
+public interface Gee.Iterable<G> : GLib.Object {
        /**
         * Returns a Iterator that can be used for simple iteration over a
         * collection.
index a4019462c378bc8ea9dd6d6569701ed0d1f45909..d8c119b6fe7cd14326a84a98a6d4939da659fadf 100644 (file)
@@ -24,7 +24,7 @@
  * Implemented by classes that support a simple iteration over instances of the
  * collection.
  */
-public interface Gee.Iterator<G> {
+public interface Gee.Iterator<G> : GLib.Object {
        /**
         * Advances to the next element in the iteration.
         *
index 0ff967b4746d091d43f8ec966fd2ea40ede9320e..d49c5256c99f95dcf793e98ebaa17e87babc7387 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * Represents a collection of items in a well-defined order.
  */
-public interface Gee.List<G> : GLib.Object, Collection<G> {
+public interface Gee.List<G> : Collection<G> {
        /**
         * Returns the item at the specified index in this list.
         *
index 6dcee69cf545d62b3c0b6325dd245330a38e2013..8c61cbeec3b381616393d2f7b0f397f9d9f76ff4 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * A map is a generic collection of key/value pairs.
  */
-public interface Gee.Map<K,V> {
+public interface Gee.Map<K,V> : GLib.Object {
        /**
         * The number of items in this map.
         */
index 30a6ea60f82a304de81264c030eb0584ad5c00e8..c9d21ddd98e6142b31f140558934b621608a1eb5 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items.
  */
-public class Gee.ReadOnlyCollection<G> : Iterable<G>, Collection<G> {
+public class Gee.ReadOnlyCollection<G> : Object, Iterable<G>, Collection<G> {
        public int size {
                get { return _collection.size; }
        }
@@ -69,7 +69,7 @@ public class Gee.ReadOnlyCollection<G> : Iterable<G>, Collection<G> {
                assert_not_reached ();
        }
 
-       private class Iterator<G> : Gee.Iterator<G> {
+       private class Iterator<G> : Object, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index b07fa4aebba0aa96e8cc8ff297795c4591150bc6..5aa3effed77a99812e5fe1005d55d46963d2b7b1 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items in a well-defined order.
  */
-public class Gee.ReadOnlyList<G> : Iterable<G>, Collection<G>, List<G> {
+public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
        public int size {
                get { return _list.size; }
        }
@@ -97,7 +97,7 @@ public class Gee.ReadOnlyList<G> : Iterable<G>, Collection<G>, List<G> {
                assert_not_reached ();
        }
 
-       class Iterator<G> : Gee.Iterator<G> {
+       class Iterator<G> : Object, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index f36c9aaed770374873d62206c7d04c613c1cf6ce..21364501a1f3284c77b5ff4b14587c2d500d25f6 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of key/value pairs.
  */
-public class Gee.ReadOnlyMap<K,V> : Map<K,V> {
+public class Gee.ReadOnlyMap<K,V> : Object, Map<K,V> {
        public int size {
                get { return _map.size; }
        }
index 81db5b3f8a72752b744813e43d79fbb640094813..272f3df64664160c2bca6d3aa4663255796eabb3 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Represents a read-only collection of items without duplicates.
  */
-public class Gee.ReadOnlySet<G> : Iterable<G>, Collection<G>, Set<G> {
+public class Gee.ReadOnlySet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
        public int size {
                get { return _set.size; }
        }
@@ -69,7 +69,7 @@ public class Gee.ReadOnlySet<G> : Iterable<G>, Collection<G>, Set<G> {
                assert_not_reached ();
        }
 
-       private class Iterator<G> : Gee.Iterator<G> {
+       private class Iterator<G> : Object, Gee.Iterator<G> {
                public bool next () {
                        return false;
                }
index 7cd6f98375dc0e2efe70ef63a40d8daabee41b5a..f0273a100eb22fc4dbe4eb5c71dbaaf288747f77 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Interface to the C compiler.
  */
-public class Vala.CCodeCompiler {
+public class Vala.CCodeCompiler : Object {
        public CCodeCompiler () {
        }
 
index 17067a8b3d657fc67d76d06def17e76b1e4e9126..fe8086aa8b0c00c9d50cd514b20f9638cd1e11cf 100644 (file)
@@ -97,6 +97,7 @@ public class Vala.CodeGenerator : CodeVisitor {
        TypeReference string_type;
        TypeReference float_type;
        TypeReference double_type;
+       DataType gobject_type;
        DataType gerror_type;
        DataType glist_type;
        DataType gslist_type;
@@ -247,6 +248,7 @@ public class Vala.CodeGenerator : CodeVisitor {
 
                var glib_ns = root_symbol.scope.lookup ("GLib");
                
+               gobject_type = (DataType) glib_ns.scope.lookup ("Object");
                gerror_type = (DataType) glib_ns.scope.lookup ("Error");
                glist_type = (DataType) glib_ns.scope.lookup ("List");
                gslist_type = (DataType) glib_ns.scope.lookup ("SList");
index a8033d95e8d058236f9566269697b6216bbfb0a3..f911a045feb413f89b90d980cea7c8801b9d74db 100644 (file)
@@ -94,10 +94,12 @@ public class Vala.CodeGenerator {
                        decl_frag.append (new CCodeTypeDefinition ("struct %s".printf (type_struct.name), new CCodeVariableDeclarator ("%sClass".printf (cl.get_cname ()))));
                }
                decl_frag.append (new CCodeTypeDefinition ("struct %s".printf (instance_priv_struct.name), new CCodeVariableDeclarator ("%sPrivate".printf (cl.get_cname ()))));
-               
-               instance_struct.add_field (cl.base_class.get_cname (), "parent");
-               instance_struct.add_field ("%sPrivate *".printf (cl.get_cname ()), "priv");
-               type_struct.add_field ("%sClass".printf (cl.base_class.get_cname ()), "parent");
+
+               if (cl.is_subtype_of (gobject_type)) {
+                       instance_struct.add_field (cl.base_class.get_cname (), "parent");
+                       instance_struct.add_field ("%sPrivate *".printf (cl.get_cname ()), "priv");
+                       type_struct.add_field ("%sClass".printf (cl.base_class.get_cname ()), "parent");
+               }
 
                if (cl.source_reference.comment != null) {
                        def_frag.append (new CCodeComment (cl.source_reference.comment));
@@ -114,7 +116,7 @@ public class Vala.CodeGenerator {
 
                cl.accept_children (this);
 
-               if (!cl.is_static) {
+               if (cl.is_subtype_of (gobject_type)) {
                        if (class_has_readable_properties (cl) || cl.get_type_parameters ().size > 0) {
                                add_get_property_function (cl);
                        }
index e22c4fc32cb1f6c2480088649e8035ebad9fd013..23180699a85e776b01c9fca5b238c457ebc6f91c 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Dynamic binding provider for DBus objects.
  */
-public class Vala.DBusBindingProvider : BindingProvider {
+public class Vala.DBusBindingProvider : Object, BindingProvider {
        public CodeContext context {
                set {
                        _context = value;
index 57ef2ec23e23b0276c8063f40d5ccbe0292aee1d..98f9c0dcde14d14861e59004758e5e41e83c1226 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * C function to register a type at runtime.
  */
-public abstract class Vala.TypeRegisterFunction {
+public abstract class Vala.TypeRegisterFunction : Object {
        private CCodeFragment declaration_fragment = new CCodeFragment ();
 
        private CCodeFragment definition_fragment = new CCodeFragment ();
index ac7627de0373783fd47e308b7fd1e2546fc00a5e..bb9351198e6efa4441c49ba4ddeeb653b30677d0 100644 (file)
@@ -1,7 +1,7 @@
 using GLib;
 
 namespace Maman {
-       class Bar {
+       class Bar : Object {
                static int main (string[] args) {
                        stdout.printf ("Class in Namespace Test\n");
                        return 0;
index 34b5655d2fde2ea387953e369a4e48c5678a8118..3003273ed4df8272db6ba6a81d8b19c5860ac4eb 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
 }
 
 class Maman.SubBar : Bar {
index ac069e522b0c68f41fa54174325e477bc647cd94..0545ca2b1064ba493b062241222ebe0240a99dd5 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public void do_action () {
                stdout.printf (" 2");
        }
index e97f42cfcceae4989255b28164cd75115ca4a3c2..7b6a178671b3b996e5e592c75f6ba5a8f6dae436 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public static void do_action () {
                stdout.printf (" 2");
        }
index cb66d9d05adccc12d7ac8c1a9c28d993750c07ad..af210c9c00e8fa56890aa6338c727567d4ac08ec 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("For Test: 1");
 
index a87a8e4c95b5b12ec10eed5c9571fa200b6ca00d..3322abcecb070f8bffb4c9e4f8f6e28abbd5e038 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public virtual void do_action () {
                stdout.printf (" BAD");
        }
index 440036893c613ae0dca94bd2700e7e96df4b5e13..c99023437f68c9460e7e64cb9aac3e616f07cfcc 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public int public_base_field = 2;
 }
 
index c653232fb43c3f59d2d719cef2b3c6879713db28..74c515c5a9a43df0a0a13785eb1b8824ad078590 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        private int _public_base_property = 2;
        public int public_base_property {
                get {
index c1daa8d7d7bd063345ddc31658f583658d909d42..c6297c3f7c3a2dce009dce95b4a189c21f07216b 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("Assignment Test: 1");
                
index 332a83208330648af6205efb26b210767e4bfbbc..0c3867ab3e9963b11a7d2cfd412c1bd0085452cc 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("Binary Expression Test: 1");
                
index 0705ef76e9017e7e53cf6e4c0b2b60e057de9f6c..99e76f2bcc6cc18e6298668a3253f15d1299b283 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("Block Test: 1");
                
index 78206070bb3c9dc46472e92a7ff0584b4e528fc7..6566f93494026dbbba043a523e7b4c12a67045ac 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("Break Test: 1");
                
index 5ac7f87fcb325abedeed0af7a7171e4553811eba..feb1e80ecb0c153e75413a4d4e4edd031c32cf87 100644 (file)
@@ -2,7 +2,7 @@ using GLib;
 
 public static delegate int Maman.ActionCallback ();
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int do_action () {
                return 2;
        }
index 943abb9cac9505254104baa9bee8ebc1b11b4037..5811d93d107b9b7657e9e430765f65b15b5c3cd3 100644 (file)
@@ -2,7 +2,7 @@ using GLib;
 
 static delegate int Maman.ActionCallback (int i);
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int do_action (ActionCallback cb) {
                return cb (1);
        }
index e0ce1f8b767b03f255a638600b3f6c82f026b68c..31299389a07d5c3efb3013d18347ed80a7188438 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static int main (string[] args) {
                stdout.printf ("Conditional Expression Test: 1");
                
index 58ba607481f989409a020d49da900077bda648c9..d269ad6596fac19bdbe3e4bb7e6dd8c85f9ca6a8 100644 (file)
@@ -1,10 +1,10 @@
 using GLib;
 
-interface Maman.Ibaz {
+interface Maman.Ibaz : Object {
        public abstract void do_action ();
 }
 
-class Maman.Baz : Ibaz {
+class Maman.Baz : Object, Ibaz {
        public void do_action () {
                stdout.printf (" 2");
        }
index 6081ed40c120193505652f8e1301ff9f4cd2bf6e..1bd38dcece6d3eb2eddbaaa6df809fda1e298389 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public signal void activated (bool b);
 
        public void do_action (bool b) {
@@ -8,7 +8,7 @@ class Maman.Foo {
        }
 }
 
-class Maman.Bar {
+class Maman.Bar : Object {
        void activated (Foo foo, bool b) {
                if (b) {
                        stdout.printf (" BAD");
index bf906a93f8644dc51069eaff4d4cd260e00b0b57..7d330726deaf1c0ff564b4fde848cc1b05b5e161 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public void run () {
                stdout.printf (" 2");
                
index 906b787e80b3888ea40d92c06cf48cda50edacb0..d69c365e2781983dda457b0585999c3ed04d93d5 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public void run () {
                stdout.printf (" 2");
                
index c2a75beb1cd50726ea10fa8cea9b13a16c64f008..8a9208270f28e34fd3a67efc6120f09f94094661 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        static int main (string[] args) {
                stdout.printf ("String Test: 1");
 
index 59b2cc7679c9094ca86d9a7c37be5726f0afd17d..6f7a5cc0eacf6ab1553a6b960e3c40a9204af42a 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public Foo (construct string bar) {
        }
 
index 605f1b5cfdefeb5e34b604d01e5c22d2fa00d7c8..ac2387eb17b37f503a93892208ce93e35647ec92 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public void run () {
                foreach (string s in create_list ()) {
                        stdout.printf (" %s", s);
index caef58f293e5c3553b08071a91674663e9fcebcc..288b2427af2fa405ec844f7a562e32003b4eea55 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public signal void activated (int i1, int i2);
 
        public void do_action () {
@@ -8,7 +8,7 @@ class Maman.Foo {
        }
 }
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public void run () {
                stdout.printf (" 2");
                
index f5bfbc64ee9c4b1f0811c081ed4ab46baa676353..2d83913e7d82d85aae4c445b42f1e4d522aebee0 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public virtual void do_action () {
                stdout.printf (" 3");
        }
index 2eddf6088041c6d1df34a7fa9df9813f30fcdcdd..2c6ab84e4044a8fb58b5e524c3ef5bb847b33993 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public void do_action () {
                stdout.printf (" 3");
        }
index b539c4d4bf7c5f0f1204b269bb2e6aebd0d64ad7..3b7cd322df990dd0e79df4a6901eac5e47cbbd41 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public int foo { get; set; }
 
        public void run () {
index 1047e46ce72eb65755fea1c7661811095a259fba..09ca12256ec0bb84cce25d2cdb7bbd20fc046740 100644 (file)
@@ -6,7 +6,7 @@ enum Maman.Foo {
        VAL5 = 5
 }
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public void run () {
                stdout.printf (" %d", Foo.VAL2);
 
index 62caf660a60793ab4fd4de49d235646aa88e19d8..966caf8985b8bbd211270a04defb7f2093fbc9ac 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        public int p1 { get; set; }
        public int p2 { get; set; }
        
index e28b4e03e19d20e7569a6ed661e5a3c4e51b5dfc..4378576f35a28c79fdc87eee0faa020b226c5d4d 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        static void main (string[] args) {
                stdout.printf (
                        "int8: %s...%s\n",
index 5ef4a0134528c83f5cd294371de76bf9781fd9aa..665e94bb9155b40de933d553bfb3c37cc0fe4a23 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Foo {
+class Maman.Foo : Object {
        const float[] FLOAT_TESTS = { 
                float.EPSILON, 0.0, 1.0, 
                -float.INFINITY,
index 72963a6d60b116e466e284eefcf15b0a17df32d4..17d6bd78ceb7d42ce62d1d752fb44f45b4c144a0 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public int[] foo_numbers () {
                return new int[3] { 2, 3, 4 };
        }
index 38a24ee99cd85208c7399caef54b2a972f0a78a6..e9e9f54827bd3f850138c310725a49922bc63c16 100644 (file)
@@ -8,7 +8,7 @@ enum Maman.BarError {
        LIST
 }
 
-class Maman.Bar {
+class Maman.Bar : Object {
        public void foo () throws BarError {
                stdout.printf (" 6");
 
index 8000c4ed104da413e095705157624159b8986c2b..835863dd54338982d0f5183858053c2dc04b0859 100644 (file)
@@ -1,15 +1,15 @@
 using GLib;
 
-class Maman.A {
+class Maman.A : Object {
 }
 
 class Maman.B : A {
 }
 
-class Maman.C {
+class Maman.C : Object {
 }
 
-class Maman.Bar {
+class Maman.Bar : Object {
        static void main () {
                var a = new A ();
                var b = new B ();
index 8e411845feb820b24d69775920c8686fc656040a..f5230facbce0c44e8078437ebd0aeae4ad6726d4 100644 (file)
@@ -1,6 +1,6 @@
 using GLib;
 
-class SwitchTest {
+class SwitchTest : Object {
     static void main () {
         var foo = "Hello World";
         var bar = 0;
index 61c904c96009906d014abea35aefe73559daacf4..67aa0ecdb88868e9ec068cd8d73845137ae2cd97 100644 (file)
@@ -1,7 +1,7 @@
 using Enchant;
 using GLib;
 
-class TestEnchant {
+class TestEnchant : Object {
        static void info (string message) {
                stdout.printf ("INFO: %s\n", message);
        }
index ec1a8023cb7d41da71a2819e6294143e8b91d4ef..ffec6ac581c327c78a2b9800fe94cadb28f9937a 100644 (file)
@@ -25,7 +25,7 @@ using GLib;
 /**
  * Interface for dynamic binding providers.
  */
-public interface Vala.BindingProvider {
+public interface Vala.BindingProvider : Object {
        /**
         * Return custom binding for the specified member access expression.
         *
index f67a93bdceedae056168b195b68066ed78c0b15f..1342cbb4932606813e095216022c121e4415554e 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * The root of the code tree.
  */
-public class Vala.CodeContext {
+public class Vala.CodeContext : Object {
        /**
         * Specifies the name of the library to be built.
         *
index 13aab72dc2101b22d4cecc3e7e580f40127829a3..26ffa1bb16f90a62ab9dd900c37db50c45f7f037 100644 (file)
@@ -28,7 +28,7 @@ using GLib;
  * Code nodes get created by the parser and are used throughout the whole
  * compilation process.
  */
-public abstract class Vala.CodeNode {
+public abstract class Vala.CodeNode : Object {
        /**
         * Parent of this code node.
         */
index 809fa3948ccbec555fabfc6d72792377fc03dca4..1d5c4fcb214a44d237bb867ad4f4252c1fa6c03f 100644 (file)
@@ -26,7 +26,7 @@ using GLib;
 /**
  * Abstract code node visitor for traversing source code tree.
  */
-public abstract class Vala.CodeVisitor {
+public abstract class Vala.CodeVisitor : Object {
        /**
         * Visit operation called for source files.
         *
index 6a5610481f0cc2ead77c95e233fc1da329a919f4..416fdc4ec6094b373836440fef991199055c6ed3 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a part of the symbol tree.
  */
-public class Vala.Scope {
+public class Vala.Scope : Object {
        /**
         * The symbol that owns this scope.
         */
index 2c131a65b688d40388918b923ef2e2feb44fa542..82b4cf60e02cdab3daf4e8c5ee82f4a78d03097a 100644 (file)
@@ -302,13 +302,6 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        }
                }
 
-               if (prereq_class == null) {
-                       /* default to GObject */
-                       var obj_type = new TypeReference ();
-                       obj_type.data_type = object_type;
-                       iface.prepend_prerequisite (obj_type);
-               }
-
                iface.accept_children (this);
 
                current_symbol = current_symbol.parent_symbol;
index 99c8af4c896d5bec3dc63be5fe4c8cbb51a9838e..c7302bb71d6a96186761e44acbc9f851c541c6ab 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a Vala source or VAPI package file.
  */
-public class Vala.SourceFile {
+public class Vala.SourceFile : Object {
        /**
         * The name of this source file.
         */
index 2154deeceefb77e5bd0caf425696b22d3d2d497c..95cf499580a187b456ff13f9d0e99f93a5445004 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 /**
  * Represents a dependency cycle of source files.
  */
-public class Vala.SourceFileCycle {
+public class Vala.SourceFileCycle : Object {
        /**
         * The members of this source file cycle.
         */
index 71b7c67d8938d6d83591ee3a4cbf1cac2a7c6168..1bebbc5c8bc2c68dd7ee88b4633de6adffd46d7d 100644 (file)
  *     Jürg Billeter <j@bitron.ch>
  */
 
+using GLib;
+
 /**
  * Represents a reference to a location in a source file.
  */
-public class Vala.SourceReference {
+public class Vala.SourceReference : Object {
        /**
         * The source file to be referenced.
         */
index f726f42aba7bc39187ee52f833106dcb19656e25..1ffd026ba439b10afcb30e6889ec8438accbdcfe 100644 (file)
@@ -32,8 +32,6 @@ public class Vala.SymbolResolver : CodeVisitor {
        Scope current_scope;
        Collection<NamespaceReference> current_using_directives;
        
-       Class object_class;
-       
        /**
         * Resolve symbol names in the specified code context.
         *
@@ -42,13 +40,7 @@ public class Vala.SymbolResolver : CodeVisitor {
        public void resolve (CodeContext! context) {
                root_symbol = context.root;
                current_scope = root_symbol.scope;
-               
-               // TODO: don't require GLib namespace in symbol resolver
-               var glib_ns = root_symbol.scope.lookup ("GLib");
-               if (glib_ns != null) {
-                       object_class = (Class) glib_ns.scope.lookup ("Object");
-               }
-               
+
                context.accept (this);
        }
        
@@ -75,13 +67,7 @@ public class Vala.SymbolResolver : CodeVisitor {
                                cl.base_class = (Class) type.data_type;
                        }
                }
-               if (cl.base_class == null && cl != object_class) {
-                       var object_type = new TypeReference ();
-                       object_type.data_type = object_class;
-                       cl.add_base_type (object_type);
-                       cl.base_class = object_class;
-               }
-       
+
                current_scope = current_scope.parent_scope;
        }
 
index 1343a50ccc6229c645171cf319e9c8f5a285c915..66499bc0e54b6ffe9fddac4a69868ebae39e58f4 100644 (file)
@@ -22,7 +22,7 @@
 
 using GLib;
 
-class Vala.VAPIGen {
+class Vala.VAPIGen : Object {
        static string directory;
        static bool version;
        [NoArrayLength ()]