[gtk+] Fix introspection
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix introspection
- Date: Sat, 29 Aug 2015 07:14:53 +0000 (UTC)
commit 6838861d26bfec9af53438022bd1f5b60bab3bf4
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 29 03:11:01 2015 -0400
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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 4fd509c..506e171 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]