From: Luca Bruno Date: Sun, 29 Aug 2010 13:35:12 +0000 (+0200) Subject: girparser: Add out/ref arguments X-Git-Tag: 0.11.2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6cdaaf12bfe5563ccd831d88da2cf219ffccde92;p=thirdparty%2Fvala.git girparser: Add out/ref arguments --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index fddfc203c..dfb27df07 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -1540,7 +1540,18 @@ public class Vala.GirParser : CodeVisitor { if (name == null) { name = default_name; } - string direction = reader.get_attribute ("direction"); + string direction = null; + if (metadata.has_argument (ArgumentType.OUT)) { + if (metadata.get_bool (ArgumentType.OUT)) { + direction = "out"; + } // null otherwise + } else if (metadata.has_argument (ArgumentType.REF)) { + if (metadata.get_bool (ArgumentType.REF)) { + direction = "inout"; + } // null otherwise + } else { + direction = reader.get_attribute ("direction"); + } string transfer = reader.get_attribute ("transfer-ownership"); string allow_none = reader.get_attribute ("allow-none");