diff options
-rw-r--r-- | numpy/core/include/numpy/npy_3kcompat.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h index 2739af3f2..3c67a2559 100644 --- a/numpy/core/include/numpy/npy_3kcompat.h +++ b/numpy/core/include/numpy/npy_3kcompat.h @@ -20,6 +20,10 @@ #include "numpy/npy_common.h" #include "numpy/ndarrayobject.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * PyInt -> PyLong */ @@ -115,20 +119,20 @@ static NPY_INLINE int PyInt_Check(PyObject *op) { static NPY_INLINE void PyUnicode_ConcatAndDel(PyObject **left, PyObject *right) { - PyObject *new; - new = PyUnicode_Concat(*left, right); + PyObject *newobj; + newobj = PyUnicode_Concat(*left, right); Py_DECREF(*left); Py_DECREF(right); - *left = new; + *left = newobj; } static NPY_INLINE void PyUnicode_Concat2(PyObject **left, PyObject *right) { - PyObject *new; - new = PyUnicode_Concat(*left, right); + PyObject *newobj; + newobj = PyUnicode_Concat(*left, right); Py_DECREF(*left); - *left = new; + *left = newobj; } @@ -312,4 +316,8 @@ simple_capsule_dtor(void *ptr) #endif +#ifdef __cplusplus +} +#endif + #endif /* _NPY_3KCOMPAT_H_ */ |