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-13 09:22:52 +0200
commit1768af53a37f6ea49d46743ee34301cb42a97395 (patch)
treeb72ff573862c4e6cf9714aa0cb60b8030f5662b8
parent7a2c9412f6937a944b1b472cc91fe59e7f727429 (diff)
downloadcython-1768af53a37f6ea49d46743ee34301cb42a97395.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 a02578acd..758aa0169 100644
--- a/Cython/Utility/Coroutine.c
+++ b/Cython/Utility/Coroutine.c
@@ -186,7 +186,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