[eog/gnome-2-30] Move Python.h include into the right spot



commit 742590dbd6d53cbd7d68d403bc84101d126d4d2f
Author: Felix Riemann <friemann gnome org>
Date:   Thu Jun 3 23:30:39 2010 +0200

    Move Python.h include into the right spot
    
    Python.h is required to be included before any standard header.
    Also it's not needed in its old position, but is in its new.
    This fixes compiler warnings about redefining _POSIX_C_SOURCE.

 src/eog-python-module.c |    4 ++++
 src/eog-python-module.h |    1 -
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-python-module.c b/src/eog-python-module.c
index 7580a92..b288190 100644
--- a/src/eog-python-module.c
+++ b/src/eog-python-module.c
@@ -24,6 +24,10 @@
 #include <config.h>
 #endif
 
+/* This needs to be included before any standard header
+ * see http://docs.python.org/c-api/intro.html#include-files */
+#include <Python.h>
+
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
 
diff --git a/src/eog-python-module.h b/src/eog-python-module.h
index 1e51fc1..3887ba6 100644
--- a/src/eog-python-module.h
+++ b/src/eog-python-module.h
@@ -25,7 +25,6 @@
 #ifndef __EOG_PYTHON_MODULE_H__
 #define __EOG_PYTHON_MODULE_H__
 
-#include <Python.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS



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