summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-03 18:08:33 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-03 19:40:08 +0200
commit7e004e0a36a8c362a568a5b47a26bfde6f98d621 (patch)
tree4ebeaccd4c0c13bb97996b779f63ae9670dabe5e
parenta6986a9ee7c4e51d55df70d95b19c86501580b21 (diff)
downloadcython-7e004e0a36a8c362a568a5b47a26bfde6f98d621.tar.gz
Avoid C compiler warning when refnanny is not used.
-rw-r--r--Cython/Utility/ObjectHandling.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
index c22099155..a23f0b766 100644
--- a/Cython/Utility/ObjectHandling.c
+++ b/Cython/Utility/ObjectHandling.c
@@ -2563,12 +2563,16 @@ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, CYTHON_UNUSE
#if CYTHON_REFNANNY
#define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
#else
- #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, NULL)
+ #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
#endif
// __Pyx_PyUnicode_ConcatInPlace is slightly odd because it has the potential to modify the input
// argument (but only in cases where no user should notice). Therefore, it needs to keep Cython's
// refnanny informed.
- static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, void* __pyx_refnanny); /* proto */
+ static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
+ #if CYTHON_REFNANNY
+ , void* __pyx_refnanny
+ #endif
+ ); /* proto */
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
@@ -2595,7 +2599,11 @@ __Pyx_unicode_modifiable(PyObject *unicode)
return 1;
}
-static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, void* __pyx_refnanny) {
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
+ #if CYTHON_REFNANNY
+ , void* __pyx_refnanny
+ #endif
+ ) {
// heavily based on PyUnicode_Append
PyObject *left = *p_left;
Py_ssize_t left_len, right_len, new_len;