]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Reuse populated Node.gtype_struct_for instead of resolving again
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 3 Mar 2021 09:05:00 +0000 (10:05 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 13 Mar 2021 20:20:36 +0000 (21:20 +0100)
This fixes the discovery of non-default type_cname for re-parented symbols.

vala/valagirparser.vala

index c33e64aad067a3e285e930a481ccc120271c8aad..e67361c0f117b6a9e0508ae36cf6751dc959e480 100644 (file)
@@ -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 ());