diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-09-01 18:22:05 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2021-09-03 10:35:29 -0600 |
commit | a3e2b7c46d4c4025f4945e3e3ea207a00a63c499 (patch) | |
tree | 9d4048f5be195b965b211e603a674da13c7225c6 /numpy/f2py | |
parent | c6ac4dab50dad3ee0936fb4b765cf4f441874d33 (diff) | |
download | numpy-a3e2b7c46d4c4025f4945e3e3ea207a00a63c499.tar.gz |
MAIN: Minor include rationalization.
- Replace "Python.h" by <Python.h>
- Replace "structmember.h" by <structmember.h>
- Replace <npy_config> by "npy_config"
- Define PY_SSIZE_T_CLEAN before all Python.h includes in .c files.
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/cfuncs.py | 2 | ||||
-rw-r--r-- | numpy/f2py/src/fortranobject.h | 2 | ||||
-rw-r--r-- | numpy/f2py/src/test/foomodule.c | 4 | ||||
-rw-r--r-- | numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py index 714f9a932..8f42b4029 100644 --- a/numpy/f2py/cfuncs.py +++ b/numpy/f2py/cfuncs.py @@ -51,7 +51,7 @@ includes0['math.h'] = '#include <math.h>' includes0['string.h'] = '#include <string.h>' includes0['setjmp.h'] = '#include <setjmp.h>' -includes['Python.h'] = '#include "Python.h"' +includes['Python.h'] = '#include <Python.h>' needs['arrayobject.h'] = ['Python.h'] includes['arrayobject.h'] = '''#define PY_ARRAY_UNIQUE_SYMBOL PyArray_API #include "arrayobject.h"''' diff --git a/numpy/f2py/src/fortranobject.h b/numpy/f2py/src/fortranobject.h index d4cc10243..278c236a7 100644 --- a/numpy/f2py/src/fortranobject.h +++ b/numpy/f2py/src/fortranobject.h @@ -4,7 +4,7 @@ extern "C" { #endif -#include "Python.h" +#include <Python.h> #ifdef FORTRANOBJECT_C #define NO_IMPORT_ARRAY diff --git a/numpy/f2py/src/test/foomodule.c b/numpy/f2py/src/test/foomodule.c index 88ec62440..00a48f4c0 100644 --- a/numpy/f2py/src/test/foomodule.c +++ b/numpy/f2py/src/test/foomodule.c @@ -9,7 +9,9 @@ extern "C" { #endif -#include "Python.h" +#define PY_SSIZE_T_CLEAN +#include <Python.h> + #include "fortranobject.h" static PyObject *foo_error; diff --git a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c index fe21d4b9b..ea47e0555 100644 --- a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c @@ -9,7 +9,9 @@ extern "C" { #endif /*********************** See f2py2e/cfuncs.py: includes ***********************/ -#include "Python.h" + +#define PY_SSIZE_T_CLEAN +#include <Python.h> #include "fortranobject.h" #include <math.h> |