[vala/wip/issue/606: 3/4] WIP girwriter: Infer gir_namespace/version from target GIR filename



commit de9b1f7abc49487e888adf6d1537ca18e57478cb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Apr 29 16:48:55 2019 +0200

    WIP girwriter: Infer gir_namespace/version from target GIR filename

 codegen/valagirwriter.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 441c7c587..4f006527d 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -299,6 +299,10 @@ public class Vala.GIRWriter : CodeVisitor {
                        return;
                }
 
+               // Use given gir_namespace and gir_version for our top-level namespace
+               ns.set_attribute_string ("CCode", "gir_namespace", gir_namespace);
+               ns.set_attribute_string ("CCode", "gir_version", gir_version);
+
                write_c_includes (ns);
 
                write_indent ();


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