]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: No support for fixed-size array as return-value
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 24 Nov 2016 08:23:40 +0000 (09:23 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 24 Nov 2016 08:23:40 +0000 (09:23 +0100)
Due to the special syntax for those arrays it lead to omitting the
array-qualifier and therefore generating broken bindings.

vala/valagirparser.vala

index 122e0ce33e68c85792647fc1d810df794fcd53dc..892afb42fed39af0f9ead92ea2c03e58b3b02d12 100644 (file)
@@ -2382,6 +2382,14 @@ public class Vala.GirParser : CodeVisitor {
                        type.nullable = true;
                }
                type = element_get_type (type, true, ref no_array_length, ref array_null_terminated);
+
+               // FIXME No support for fixed-size array as return-value
+               var array_type = type as ArrayType;
+               if (array_type != null && array_type.fixed_length) {
+                       array_type.fixed_length = false;
+                       array_type.length = null;
+               }
+
                end_element ("return-value");
                return type;
        }