From: Rico Tzschichholz Date: Wed, 3 Mar 2021 09:05:00 +0000 (+0100) Subject: girparser: Reuse populated Node.gtype_struct_for instead of resolving again X-Git-Tag: 0.51.90~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a827cd77f27d0d6ba36308f045d809b386538020;p=thirdparty%2Fvala.git girparser: Reuse populated Node.gtype_struct_for instead of resolving again This fixes the discovery of non-default type_cname for re-parented symbols. --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 836d2436f..02e9bbc68 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -1213,9 +1213,8 @@ public class Vala.GirParser : CodeVisitor { merged = true; } else { // record for a gtype - var gtype_struct_for = girdata["glib:is-gtype-struct-for"]; if (gtype_struct_for != null) { - var obj = parser.resolve_node (parent, parser.parse_symbol_from_string (gtype_struct_for, source_reference)); + var obj = parser.resolve_node (parent, gtype_struct_for); if (obj != null && obj.symbol is Interface && "%sIface".printf (obj.get_cname ()) != get_cname ()) { // set the interface struct name obj.symbol.set_attribute_string ("CCode", "type_cname", get_cname ());