]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GIR writer: Fix critical warnings
authorJürg Billeter <j@bitron.ch>
Thu, 30 Apr 2009 21:10:22 +0000 (23:10 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 30 Apr 2009 21:10:22 +0000 (23:10 +0200)
gobject/valagirwriter.vala

index 9395143cef29f0b79d8275885cd2f21cbfe6f958..407942d746633ace36fb3eb4583e1d92bc3e09c3 100644 (file)
@@ -633,7 +633,7 @@ public class Vala.GIRWriter : CodeVisitor {
                } else if (type is PointerType) {
                        write_indent ();
                        stream.printf ("<type name=\"any\" c:type=\"%s\"/>\n", type.get_cname ());
-               } else {
+               } else if (type.data_type != null) {
                        write_indent ();
                        stream.printf ("<type name=\"%s\" c:type=\"%s\"", gi_type_name (type.data_type), type.get_cname ());
 
@@ -652,6 +652,9 @@ public class Vala.GIRWriter : CodeVisitor {
                                write_indent ();
                                stream.printf ("</type>\n");
                        }
+               } else {
+                       write_indent ();
+                       stream.printf ("<type name=\"%s\"/>\n", type.to_string ());
                }
        }