]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix construct properties in interfaces
authorJürg Billeter <j@bitron.ch>
Thu, 1 Apr 2010 08:45:33 +0000 (10:45 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 1 Apr 2010 08:45:33 +0000 (10:45 +0200)
codegen/valagobjectmodule.vala
codegen/valagtypemodule.vala

index 0894b03c1ab7e79be733349eeea369e7c3a0d9d5..e1c6213b385a2179eb4e0a430e52f94b121a85c8 100644 (file)
@@ -1,6 +1,6 @@
 /* valagobjectmodule.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  * Copyright (C) 2006-2008  Raffaele Sandrini
  *
  * This library is free software; you can redistribute it and/or
@@ -730,14 +730,14 @@ internal class Vala.GObjectModule : GTypeModule {
        public override void visit_property (Property prop) {
                base.visit_property (prop);
 
-               if (is_gobject_property (prop)) {
+               if (is_gobject_property (prop) && prop.parent_symbol is Class) {
                        prop_enum.add_value (new CCodeEnumValue (prop.get_upper_case_cname ()));
                }
        }
 
        public override bool is_gobject_property (Property prop) {
-               var cl = prop.parent_symbol as Class;
-               if (cl == null || !cl.is_subtype_of (gobject_type)) {
+               var type_sym = prop.parent_symbol as ObjectTypeSymbol;
+               if (type_sym == null || !type_sym.is_subtype_of (gobject_type)) {
                        return false;
                }
 
index 90d2d720163cd3997ee71434a8ec8b14178c4101..fe1c8af757ce92c2d687256c8ec4e7ec8080514a 100644 (file)
@@ -1963,8 +1963,7 @@ internal class Vala.GTypeModule : GErrorModule {
                        var props = iface.get_properties ();
                        foreach (Property prop in props) {
                                if (prop.is_abstract) {
-
-                                       if (prop.property_type is ArrayType) {
+                                       if (!is_gobject_property (prop)) {
                                                continue;
                                        }