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-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8c267832e311baa0c2dc878e38c68b6ad0925e2;p=thirdparty%2Fvala.git girparser: Don't discard explictly given ctype of parameters --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 055a1fbb5..76bb6a2c7 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -2715,8 +2715,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));