diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2015-10-31 14:03:21 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2015-10-31 14:17:46 -0700 |
commit | a8293f411234180d70e9ff979954b28381842e1f (patch) | |
tree | 79aaeb0d881cc7ef6d957f388b9f5a5eb3d7cf6d | |
parent | 3b1d130174951f7648beceac270daa8ac65939c7 (diff) | |
download | pygobject-a8293f411234180d70e9ff979954b28381842e1f.tar.gz |
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
-rw-r--r-- | gi/gobjectmodule.c | 1 | ||||
-rw-r--r-- | gi/pygi-array.c | 2 | ||||
-rw-r--r-- | gi/pygi-cache.c | 2 | ||||
-rw-r--r-- | gi/pygi-enum-marshal.c | 2 | ||||
-rw-r--r-- | gi/pygi-hashtable.c | 1 | ||||
-rw-r--r-- | gi/pygi-hashtable.h | 2 | ||||
-rw-r--r-- | gi/pygi-list.c | 1 | ||||
-rw-r--r-- | gi/pygi-object.c | 2 | ||||
-rw-r--r-- | gi/pygi-struct-marshal.c | 2 | ||||
-rw-r--r-- | gi/pygi-value.c | 1 |
10 files changed, 10 insertions, 6 deletions
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c index 33da181c..726216dd 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 1f62b946..5c344674 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 0869e390..62b09615 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 32ca9dcd..e1a7028e 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 4bf2b4f8..d785daa2 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 efd69f61..74cd04fc 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 e3f3c674..41a3d323 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 0404fe74..a082992f 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 9bf3b542..353a2d16 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 79ee596f..2cf567d8 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" |