[vala/0.36] girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it
- Date: Tue, 13 Aug 2019 15:19:39 +0000 (UTC)
commit 099510c6159c3276830d685b446ec883c22df411
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Apr 27 11:17:28 2019 +0200
girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it
This makes sure to pick up the dependency on GObject-2.0.gir
codegen/valagirwriter.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index e3745b09a..17db20645 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -111,6 +111,7 @@ public class Vala.GIRWriter : CodeVisitor {
private TypeSymbol gobject_type;
private TypeSymbol ginitiallyunowned_type;
+ private TypeSymbol gtypeinterface_type;
private struct GIRNamespace {
public GIRNamespace (string ns, string version) {
@@ -153,6 +154,7 @@ public class Vala.GIRWriter : CodeVisitor {
var glib_ns = root_symbol.scope.lookup ("GLib");
gobject_type = (TypeSymbol) glib_ns.scope.lookup ("Object");
ginitiallyunowned_type = (TypeSymbol) glib_ns.scope.lookup ("InitiallyUnowned");
+ gtypeinterface_type = (TypeSymbol) glib_ns.scope.lookup ("TypeInterface");
write_package (package);
@@ -551,7 +553,7 @@ public class Vala.GIRWriter : CodeVisitor {
buffer.append_printf ("<field name=\"parent_iface\">\n");
indent++;
write_indent ();
- buffer.append_printf ("<type name=\"GObject.TypeInterface\" c:type=\"GTypeInterface\"/>\n");
+ buffer.append_printf ("<type name=\"%s\" c:type=\"%s\"/>\n", gi_type_name
(gtypeinterface_type), CCodeBaseModule.get_ccode_name (gtypeinterface_type));
indent--;
write_indent ();
buffer.append_printf ("</field>\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]