Lines Matching refs:yf
322 gen_close_iter(PyObject *yf)
326 if (PyGen_CheckExact(yf) || PyCoro_CheckExact(yf)) {
327 retval = gen_close((PyGenObject *)yf, NULL);
333 if (_PyObject_LookupAttr(yf, &_Py_ID(close), &meth) < 0) {
334 PyErr_WriteUnraisable(yf);
350 PyObject *yf = NULL;
368 yf = _PyFrame_StackPeek(frame);
369 Py_INCREF(yf);
372 return yf;
379 PyObject *yf = _PyGen_yf(gen);
382 if (yf) {
385 err = gen_close_iter(yf);
387 Py_DECREF(yf);
423 PyObject *yf = _PyGen_yf(gen);
425 if (yf) {
438 err = gen_close_iter(yf);
440 Py_DECREF(yf);
445 if (PyGen_CheckExact(yf) || PyCoro_CheckExact(yf)) {
446 /* `yf` is a generator or a coroutine. */
460 ret = _gen_throw((PyGenObject *)yf, close_on_genexit,
466 /* `yf` is an iterator or a coroutine-like object. */
468 if (_PyObject_LookupAttr(yf, &_Py_ID(throw), &meth) < 0) {
469 Py_DECREF(yf);
473 Py_DECREF(yf);
482 Py_DECREF(yf);
488 assert(ret == yf);
751 PyObject *yf = _PyGen_yf(gen);
752 if (yf == NULL)
754 return yf;
1106 PyObject *yf = _PyGen_yf((PyGenObject *) coro);
1107 if (yf == NULL)
1109 return yf;