[vala/0.50] girparser: Reuse populated Node.gtype_struct_for instead of resolving again
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.50] girparser: Reuse populated Node.gtype_struct_for instead of resolving again
- Date: Sun, 14 Mar 2021 15:47:53 +0000 (UTC)
commit b5b0101efdf91e558f481f5329c99cc9e08193f9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Mar 3 10:05:00 2021 +0100
girparser: Reuse populated Node.gtype_struct_for instead of resolving again
This fixes the discovery of non-default type_cname for re-parented symbols.
vala/valagirparser.vala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index c33e64aad..e67361c0f 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 ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]