diff options
| author | Pauli Virtanen <pav@iki.fi> | 2010-07-17 13:11:05 +0000 |
|---|---|---|
| committer | Pauli Virtanen <pav@iki.fi> | 2010-07-17 13:11:05 +0000 |
| commit | 03f4cf39407556cd235998e11cc7eeafb376dfec (patch) | |
| tree | 57e5c1cd57233382e118f3362cd7ce5acabb2dab /numpy | |
| parent | 3b21802c8aa4902627973c910aa8ab0d8c8fe2c6 (diff) | |
| download | numpy-03f4cf39407556cd235998e11cc7eeafb376dfec.tar.gz | |
BUG: core: fix C++ issues in npy_3kcompat.h
Diffstat (limited to 'numpy')
| -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_ */ |
