diff options
Diffstat (limited to 'Cython/Utility/ObjectHandling.c')
-rw-r--r-- | Cython/Utility/ObjectHandling.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c index 8b572ca6f..02574e46e 100644 --- a/Cython/Utility/ObjectHandling.c +++ b/Cython/Utility/ObjectHandling.c @@ -2321,7 +2321,10 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif -#ifdef __Pyx_CyFunction_USED +#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG) + // TODO PyCFunction_GET_FLAGS has a type-check assert that breaks with a CyFunction + // in debug mode. There is likely to be a better way of avoiding tripping this + // check that doesn't involve disabling the optimized path. if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) |