[vala/0.34] girparser: Handle metadata for fields inside a transparent union
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.34] girparser: Handle metadata for fields inside a transparent union
- Date: Sat, 9 Dec 2017 13:42:39 +0000 (UTC)
commit 469898a5ee8b9aba865b861ea76d3d726761732e
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 5d54b5e..07a66e1 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1586,6 +1586,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]