From: Rico Tzschichholz Date: Sun, 3 Mar 2024 15:53:35 +0000 (+0100) Subject: girparser: Don't discard explictly given ctype of parameters X-Git-Tag: 0.56.15~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3542177a3c6909bfad39b3ce57e8dc79a0c0e4dd;p=thirdparty%2Fvala.git girparser: Don't discard explictly given ctype of parameters --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 703e3974e..ed8f62ef0 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -2669,8 +2669,12 @@ public class Vala.GirParser : CodeVisitor { bool changed; type = element_get_type (type, direction == "out" || direction == "inout", ref no_array_length, ref array_null_terminated, out changed); if (!changed) { - // discard ctype, duplicated information - ctype = null; + if (metadata.has_argument (ArgumentType.CTYPE)) { + ctype = metadata.get_string (ArgumentType.CTYPE); + } else { + // discard ctype, duplicated information + ctype = null; + } } param = new Parameter (name, type, get_src (begin));