From: Rico Tzschichholz Date: Sat, 27 Apr 2019 09:17:28 +0000 (+0200) Subject: girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it X-Git-Tag: 0.45.1~37 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fkeep-around%2F7ac4a4ac6a4a98db2f81f03adf0a24447b87b0b6;p=thirdparty%2Fvala.git girwriter: Properly resolve GLib.TypeInterface instead of hardcoding it This makes sure to pick up the dependency on GObject-2.0.gir --- diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala index c5bec0fce..7a0191b72 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); @@ -554,7 +556,7 @@ public class Vala.GIRWriter : CodeVisitor { buffer.append_printf ("\n"); indent++; write_indent (); - buffer.append_printf ("\n"); + buffer.append_printf ("\n", gi_type_name (gtypeinterface_type), get_ccode_name (gtypeinterface_type)); indent--; write_indent (); buffer.append_printf ("\n");