summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2023-04-09 08:38:46 +0200
committerStefan Behnel <stefan_ml@behnel.de>2023-04-09 08:38:46 +0200
commitd0bbecb7fba10f8a992972ea824b55a851646938 (patch)
treebf3cc56f179923499f0cdaa4d478825285f903c2
parenta5bb829bbc538467d1fe557b6001a4c1c5a88bd9 (diff)
downloadcython-d0bbecb7fba10f8a992972ea824b55a851646938.tar.gz
Fix argument type in call to PyGen_GetCode().
-rw-r--r--Cython/Utility/Coroutine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c
index aae9507b8..8aca46bd7 100644
--- a/Cython/Utility/Coroutine.c
+++ b/Cython/Utility/Coroutine.c
@@ -179,7 +179,7 @@ static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) {
#endif
#if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE)
#if PY_VERSION_HEX >= 0x030C00A6
- if (PyGen_CheckExact(obj) && (PyGen_GetCode(obj)->co_flags & CO_ITERABLE_COROUTINE)) {
+ if (PyGen_CheckExact(obj) && (PyGen_GetCode((PyGenObject*)obj)->co_flags & CO_ITERABLE_COROUTINE)) {
#else
if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) {
#endif