]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gidlparser: Add support for array return values in delegates
authorMichal Hruby <michal.mhr@gmail.com>
Wed, 9 Mar 2011 19:16:04 +0000 (20:16 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 4 Apr 2011 15:26:59 +0000 (17:26 +0200)
Partially fixes bug 644420.

vapigen/valagidlparser.vala

index ca185ee4b6f7f4a312aa03cc3a6d0102ef3a806e..740fb0bc51e54eabdf61ff6e813184dd4baa7a9f 100644 (file)
@@ -473,6 +473,15 @@ public class Vala.GIdlParser : CodeVisitor {
                                        if (eval (nv[1]) == "1") {
                                                return_type.value_owned = true;
                                        }
+                               } else if (nv[0] == "is_array") {
+                                       if (eval (nv[1]) == "1") {
+                                               return_type = new ArrayType (return_type, 1, return_type.source_reference);
+                                               cb.return_type = return_type;
+                                       }
+                               } else if (nv[0] == "array_length_type") {
+                                       cb.array_length_type = eval (nv[1]);
+                               } else if (nv[0] == "type_name") {
+                                       cb.return_type = return_type = parse_type_from_string (eval (nv[1]), return_type.value_owned);
                                } else if (nv[0] == "deprecated") {
                                        if (eval (nv[1]) == "1") {
                                                cb.deprecated = true;