summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-21 08:56:44 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-21 08:56:44 +0200
commit0917df8f32515daa0c67d0caf2104462aebd36ae (patch)
tree35ce0a46b8370d85f5fcdc7548d5535362a34023
parentb0d8de7928019372ebd5fb81e027529e79aa922e (diff)
downloadcython-0917df8f32515daa0c67d0caf2104462aebd36ae.tar.gz
Guard helper function against missing usage when direct type slot access is disabled.
-rw-r--r--Cython/Utility/Coroutine.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c
index 608fa8ca5..70864661f 100644
--- a/Cython/Utility/Coroutine.c
+++ b/Cython/Utility/Coroutine.c
@@ -5,12 +5,14 @@ static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject
//////////////////// GeneratorYieldFrom ////////////////////
//@requires: Generator
+#if CYTHON_USE_TYPE_SLOTS
static void __PyxPyIter_CheckErrorAndDecref(PyObject *source) {
PyErr_Format(PyExc_TypeError,
"iter() returned non-iterator of type '%.100s'",
Py_TYPE(source)->tp_name);
Py_DECREF(source);
}
+#endif
static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) {
PyObject *source_gen, *retval;