From: Michal Hruby Date: Wed, 9 Mar 2011 19:16:04 +0000 (+0100) Subject: gidlparser: Add support for array return values in delegates X-Git-Tag: 0.13.0~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3b704038a7874055c2707bd791428a030d18b64;p=thirdparty%2Fvala.git gidlparser: Add support for array return values in delegates Partially fixes bug 644420. --- diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index ca185ee4b..740fb0bc5 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -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;