summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/f2py/rules.py3
-rw-r--r--numpy/f2py/src/fortranobject.c3
-rw-r--r--numpy/f2py/src/fortranobject.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index 389ee92bc..b46776777 100644
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -109,6 +109,8 @@ module_rules={
* $D"""+"""ate:$
* Do not edit this file directly unless you know what you are doing!!!
*/
+
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#ifdef __cplusplus
extern \"C\" {
#endif
@@ -232,6 +234,7 @@ PyMODINIT_FUNC init#modulename#(void) {
#ifdef __cplusplus
}
#endif
+#undef NPY_NO_DEPRECATED_API
""",
'separatorsfor':{'latexdoc':'\n\n',
'restdoc':'\n\n'},
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
index 37b0b0e62..e88e83f0e 100644
--- a/numpy/f2py/src/fortranobject.c
+++ b/numpy/f2py/src/fortranobject.c
@@ -1,4 +1,5 @@
#define FORTRANOBJECT_C
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include "fortranobject.h"
#ifdef __cplusplus
@@ -1032,4 +1033,6 @@ F2PyCapsule_Check(PyObject *ptr)
#ifdef __cplusplus
}
#endif
+
+#undef NPY_NO_DEPRECATED_API
/************************* EOF fortranobject.c *******************************/
diff --git a/numpy/f2py/src/fortranobject.h b/numpy/f2py/src/fortranobject.h
index 2b52f7cb7..c9b54e259 100644
--- a/numpy/f2py/src/fortranobject.h
+++ b/numpy/f2py/src/fortranobject.h
@@ -4,8 +4,6 @@
extern "C" {
#endif
-#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
-
#include "Python.h"
#ifdef FORTRANOBJECT_C