[vala] girwriter: fall back on gir_namespace if GIR name is not available
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girwriter: fall back on gir_namespace if GIR name is not available
- Date: Fri, 27 Jun 2014 04:48:16 +0000 (UTC)
commit 4e603584237ba6c83f3aee1f819975c077939669
Author: Evan Nemerson <evan nemerson com>
Date: Thu Jun 26 21:47:09 2014 -0700
girwriter: fall back on gir_namespace if GIR name is not available
codegen/valagirwriter.vala | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index d2a2266..9ef70a6 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -1338,7 +1338,15 @@ public class Vala.GIRWriter : CodeVisitor {
}
private string? get_full_gir_name (Symbol sym) {
- var gir_name = sym.get_attribute_string ("GIR", "name") ?? sym.name;
+ string? gir_name = sym.get_attribute_string ("GIR", "name");
+
+ if (gir_name == null && sym is Namespace) {
+ gir_name = sym.get_attribute_string ("CCode", "gir_namespace");
+ }
+ if (gir_name == null) {
+ gir_name = sym.name;
+ }
+
if (sym.parent_symbol == null) {
return gir_name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]