summaryrefslogtreecommitdiff
path: root/numpy/f2py/src/fortranobject.h
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-12-05 13:26:44 +0200
committerGitHub <noreply@github.com>2019-12-05 13:26:44 +0200
commit1783e6fc437f34af1d652cbae36a68abcbf41fbc (patch)
tree4bce264cfcafca39df9fe41fa96d6a009017523e /numpy/f2py/src/fortranobject.h
parent9a79803e5edd0819bfa4c19a3442f75209fee5ec (diff)
parent3c6bbd7b43bf584aeef780a9e42acf2ecce7b179 (diff)
downloadnumpy-1783e6fc437f34af1d652cbae36a68abcbf41fbc.tar.gz
Merge pull request #15022 from eric-wieser/better-f2py-error
ENH: f2py: improve error messages
Diffstat (limited to 'numpy/f2py/src/fortranobject.h')
-rw-r--r--numpy/f2py/src/fortranobject.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/numpy/f2py/src/fortranobject.h b/numpy/f2py/src/fortranobject.h
index 5d0dcf676..21f1977eb 100644
--- a/numpy/f2py/src/fortranobject.h
+++ b/numpy/f2py/src/fortranobject.h
@@ -11,30 +11,7 @@ extern "C" {
#endif
#define PY_ARRAY_UNIQUE_SYMBOL _npy_f2py_ARRAY_API
#include "numpy/arrayobject.h"
-
-/*
- * Python 3 support macros
- */
-#if PY_VERSION_HEX >= 0x03000000
-#define PyString_Check PyBytes_Check
-#define PyString_GET_SIZE PyBytes_GET_SIZE
-#define PyString_AS_STRING PyBytes_AS_STRING
-#define PyString_FromString PyBytes_FromString
-#define PyUString_FromStringAndSize PyUnicode_FromStringAndSize
-#define PyString_ConcatAndDel PyBytes_ConcatAndDel
-#define PyString_AsString PyBytes_AsString
-
-#define PyInt_Check PyLong_Check
-#define PyInt_FromLong PyLong_FromLong
-#define PyInt_AS_LONG PyLong_AsLong
-#define PyInt_AsLong PyLong_AsLong
-
-#define PyNumber_Int PyNumber_Long
-
-#else
-
-#define PyUString_FromStringAndSize PyString_FromStringAndSize
-#endif
+#include "numpy/npy_3kcompat.h"
#ifdef F2PY_REPORT_ATEXIT