From 6838861d26bfec9af53438022bd1f5b60bab3bf4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 29 Aug 2015 03:11:01 -0400 Subject: [PATCH] Fix introspection Calling our get_type functions without prior gtk_init() is not ok, and causes warnings now. Avoid that by teaching g-ir-scanner to put a gtk_init() call into its generated code. --- gtk/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 4fd509cdac..506e17185d 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1366,7 +1366,7 @@ introspection_files += \ endif include $(INTROSPECTION_MAKEFILE) -INTROSPECTION_SCANNER_ENV = CC="$(CC)" +INTROSPECTION_SCANNER_ENV = CC="$(CC)" CPPFLAGS="-I$(top_srcdir) -I$(top_builddir) -I. -include gtk.h" INTROSPECTION_COMPILER_ARGS = \ --includedir=$(srcdir) \ --includedir=. \ @@ -1376,6 +1376,7 @@ Gtk-3.0.gir: $(INTROSPECTION_SCANNER) libgtk-3.la $(top_builddir)/gdk/Gdk-3.0.gi Gtk_3_0_gir_SCANNERFLAGS = \ --warn-all \ --add-include-path=$(top_builddir)/gdk \ + --add-init-section="gtk_init (NULL, NULL);" \ --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir Gtk_3_0_gir_INCLUDES = Atk-1.0 if USE_X11