Skip to content
Snippets Groups Projects
Commit 1359be266bae authored by Stefan Behnel's avatar Stefan Behnel
Browse files

Avoid a call to PyTuple_GET_ITEM() to get the item array pointer if...

Avoid a call to PyTuple_GET_ITEM() to get the item array pointer if CYTHON_ASSUME_SAFE_MACROS is disabled.
See https://github.com/cython/cython/issues/3701
parent 05a3fa717dfc
No related branches found
No related tags found
No related merge requests found
......@@ -652,4 +652,5 @@
// CPython would normally use vectorcall directly instead of tp_call.
__pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), PyTuple_GET_SIZE(args), kw);
......@@ -655,4 +656,9 @@
return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), PyTuple_GET_SIZE(args), kw);
#else
// avoid unused function warning
(void) &__Pyx_PyVectorcall_FastCallDict;
return PyVectorcall_Call(func, args, kw);
#endif
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment