]> 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>
Sun, 22 Apr 2018 12:58:23 +0000 (14:58 +0200)
This is simply a last resort to report a meaningfull error.

vala/valagirparser.vala

index 33bbfd1d23ab43067df448ae3380d486d827195d..94a8721a8e22eb87573fe84bb798e2da6d00eaf0 100644 (file)
@@ -2607,6 +2607,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