[pygobject] Fix build warnings regarding _POSIX_C_SOURCE redefinition
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fix build warnings regarding _POSIX_C_SOURCE redefinition
- Date: Sat, 31 Oct 2015 21:54:38 +0000 (UTC)
commit a8293f411234180d70e9ff979954b28381842e1f
Author: Simon Feltman <sfeltman src gnome org>
Date: Sat Oct 31 14:03:21 2015 -0700
Fix build warnings regarding _POSIX_C_SOURCE redefinition
Move Python.h includes above glib includes to avoid build
warnings with Python 2 as noted here:
https://docs.python.org/2/c-api/intro.html#include-files
gi/gobjectmodule.c | 1 +
gi/pygi-array.c | 2 +-
gi/pygi-cache.c | 2 +-
gi/pygi-enum-marshal.c | 2 +-
gi/pygi-hashtable.c | 1 +
gi/pygi-hashtable.h | 2 +-
gi/pygi-list.c | 1 +
gi/pygi-object.c | 2 +-
gi/pygi-struct-marshal.c | 2 +-
gi/pygi-value.c | 1 +
10 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c
index 33da181..726216d 100644
--- a/gi/gobjectmodule.c
+++ b/gi/gobjectmodule.c
@@ -22,6 +22,7 @@
# include <config.h>
#endif
+#include <Python.h>
#include <gobject/gvaluecollector.h>
#include <girepository.h>
#include <pyglib.h>
diff --git a/gi/pygi-array.c b/gi/pygi-array.c
index 1f62b94..5c34467 100644
--- a/gi/pygi-array.c
+++ b/gi/pygi-array.c
@@ -18,8 +18,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include <pyglib-python-compat.h>
#include "pygi-array.h"
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 0869e39..62b0961 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <Python.h>
#include <girepository.h>
#include "pyglib.h"
@@ -1176,4 +1177,3 @@ pygi_closure_cache_new (GICallableInfo *info)
return closure_cache;
}
-
diff --git a/gi/pygi-enum-marshal.c b/gi/pygi-enum-marshal.c
index 32ca9dc..e1a7028 100644
--- a/gi/pygi-enum-marshal.c
+++ b/gi/pygi-enum-marshal.c
@@ -18,8 +18,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include <pyglib-python-compat.h>
#include "pygi-enum-marshal.h"
diff --git a/gi/pygi-hashtable.c b/gi/pygi-hashtable.c
index 4bf2b4f..d785daa 100644
--- a/gi/pygi-hashtable.c
+++ b/gi/pygi-hashtable.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <Python.h>
#include "pygi-hashtable.h"
#include "pygi-argument.h"
#include "pygi-private.h"
diff --git a/gi/pygi-hashtable.h b/gi/pygi-hashtable.h
index efd69f6..74cd04f 100644
--- a/gi/pygi-hashtable.h
+++ b/gi/pygi-hashtable.h
@@ -20,8 +20,8 @@
#ifndef __PYGI_HASHTABLE_H__
#define __PYGI_HASHTABLE_H__
-#include <girepository.h>
#include "pygi-cache.h"
+#include <girepository.h>
G_BEGIN_DECLS
diff --git a/gi/pygi-list.c b/gi/pygi-list.c
index e3f3c67..41a3d32 100644
--- a/gi/pygi-list.c
+++ b/gi/pygi-list.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <Python.h>
#include "pygi-list.h"
#include "pygi-argument.h"
#include "pygi-private.h"
diff --git a/gi/pygi-object.c b/gi/pygi-object.c
index 0404fe7..a082992 100644
--- a/gi/pygi-object.c
+++ b/gi/pygi-object.c
@@ -18,8 +18,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include <pyglib-python-compat.h>
#include "pygi-object.h"
diff --git a/gi/pygi-struct-marshal.c b/gi/pygi-struct-marshal.c
index 9bf3b54..353a2d1 100644
--- a/gi/pygi-struct-marshal.c
+++ b/gi/pygi-struct-marshal.c
@@ -18,8 +18,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include <pyglib-python-compat.h>
#include "pygi-struct-marshal.h"
diff --git a/gi/pygi-value.c b/gi/pygi-value.c
index 79ee596..2cf567d 100644
--- a/gi/pygi-value.c
+++ b/gi/pygi-value.c
@@ -16,6 +16,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <Python.h>
#include "pygi-value.h"
#include "pyglib-python-compat.h"
#include "pygobject-private.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]