Lines Matching refs:finalizer
859 PyObject *finalizer = NULL; in sys_set_asyncgen_hooks() local
863 &firstiter, &finalizer)) { in sys_set_asyncgen_hooks()
867 if (finalizer && finalizer != Py_None) { in sys_set_asyncgen_hooks()
868 if (!PyCallable_Check(finalizer)) { in sys_set_asyncgen_hooks()
871 Py_TYPE(finalizer)->tp_name); in sys_set_asyncgen_hooks()
874 _PyEval_SetAsyncGenFinalizer(finalizer); in sys_set_asyncgen_hooks()
876 else if (finalizer == Py_None) { in sys_set_asyncgen_hooks()
907 PyObject *finalizer = _PyEval_GetAsyncGenFinalizer(); in sys_get_asyncgen_hooks() local
918 if (finalizer == NULL) { in sys_get_asyncgen_hooks()
919 finalizer = Py_None; in sys_get_asyncgen_hooks()
925 Py_INCREF(finalizer); in sys_get_asyncgen_hooks()
926 PyStructSequence_SET_ITEM(res, 1, finalizer); in sys_get_asyncgen_hooks()