]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Deal with missing "name" attribute by falling back on "c:type"
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 22 Apr 2018 12:54:41 +0000 (14:54 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 May 2018 19:04:54 +0000 (21:04 +0200)
This is simply a last resort to report a meaningfull error.

vala/valagirparser.vala

index 5bc4d62cba28ed2ac8a05cd97f4c3773dee0e8f9..bd4261c83e8e36361992856a1c80efbd420434e9 100644 (file)
@@ -2591,6 +2591,10 @@ public class Vala.GirParser : CodeVisitor {
                        type_name = "GLib.GenericArray";
                }
 
+               if (type_name == null) {
+                       type_name = ctype;
+               }
+
                DataType type = parse_type_from_gir_name (type_name, out no_array_length, out array_null_terminated, ctype);
 
                // type arguments / element types