]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix constructors in inner structs
authorJürg Billeter <j@bitron.ch>
Mon, 15 Dec 2008 08:30:07 +0000 (08:30 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 15 Dec 2008 08:30:07 +0000 (08:30 +0000)
2008-12-15  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodemethodmodule.vala:

Fix constructors in inner structs

svn path=/trunk/; revision=2152

ChangeLog
gobject/valaccodemethodmodule.vala

index 30c69d03ed417766864bcdb09da17ff8945ae11b..8933bead2b855659eff5370e098b9c3fa9b91183 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-15  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodemethodmodule.vala:
+
+       Fix constructors in inner structs
+
 2008-12-15  Jürg Billeter  <j@bitron.ch>
 
        * vala/valastruct.vala:
index 8e98f016e2916b7a72bd9003c13b1f1faa1832f4..459cb4e01cb0615d159552eb112d32600dd5616b 100644 (file)
@@ -846,13 +846,13 @@ public class Vala.CCodeMethodModule : CCodeStructModule {
                head.visit_method (m);
 
                DataType creturn_type;
-               if (current_class != null) {
+               if (current_type_symbol is Class) {
                        creturn_type = new ObjectType (current_class);
                } else {
                        creturn_type = new VoidType ();
                }
 
-               if (current_class != null && !current_class.is_compact) {
+               if (current_type_symbol is Class && !current_class.is_compact) {
                        var vfunc = new CCodeFunction (m.get_cname (), creturn_type.get_cname ());
                        vfunc.line = function.line;
 
@@ -881,7 +881,7 @@ public class Vala.CCodeMethodModule : CCodeStructModule {
                        source_type_member_definition.append (vfunc);
                }
 
-               if (current_class != null && current_class.is_subtype_of (gobject_type)
+               if (current_type_symbol is Class && current_class.is_subtype_of (gobject_type)
                    && (((CreationMethod) m).n_construction_params > 0 || current_class.get_type_parameters ().size > 0)) {
                        var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.GREATER_THAN, new CCodeIdentifier ("__params_it"), new CCodeIdentifier ("__params"));
                        var cdofreeparam = new CCodeBlock ();