[vala/staging] girparser: Handle metadata for fields inside a transparent union
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Handle metadata for fields inside a transparent union
- Date: Thu, 7 Dec 2017 16:55:54 +0000 (UTC)
commit 1775fa506656d6abd7f88223355249a7e43d2ffb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Dec 7 17:32:54 2017 +0100
girparser: Handle metadata for fields inside a transparent union
vala/valagirparser.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index c4a6bf9..a63b90d 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1592,6 +1592,10 @@ public class Vala.GirParser : CodeVisitor {
if (child_name == null) {
child_name = reader.get_attribute ("glib:name");
}
+ // Give a transparent union the generic name "union"
+ if (selector == "union" && child_name == null) {
+ child_name = "union";
+ }
if (child_name == null) {
return Metadata.empty;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]