[vala/staging] girwriter: GIR.name on symbols defines the final name under GIR namespace



commit 099a2c945b82db2070558fcb44855f39d892b324
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Mar 17 16:13:42 2017 +0100

    girwriter: GIR.name on symbols defines the final name under GIR namespace
    
    See https://gitlab.gnome.org/GNOME/vala/issues/541

 codegen/valagirwriter.vala | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 1b9a185ba..b6b53994a 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -742,6 +742,13 @@ public class Vala.GIRWriter : CodeVisitor {
                string? gir_name = null;
                var h0 = hierarchy[0];
 
+               assert (!(symbol is Namespace));
+
+               gir_name = symbol.get_attribute_string ("GIR", "name");
+               if (gir_name != null) {
+                       return gir_name;
+               }
+
                for (Symbol? cur_sym = symbol ; cur_sym != null ; cur_sym = cur_sym.parent_symbol) {
                        if (cur_sym == h0) {
                                break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]