#ifndef Py_LIMITED_API
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
-PyAPI_FUNC(void) PyEval_SetCoroutineWrapper(PyObject *wrapper);
-PyAPI_FUNC(PyObject *) PyEval_GetCoroutineWrapper(void);
+PyAPI_FUNC(void) _PyEval_SetCoroutineWrapper(PyObject *wrapper);
+PyAPI_FUNC(PyObject *) _PyEval_GetCoroutineWrapper(void);
#endif
struct _frame; /* Avoid including frameobject.h */
return NULL;
if (co->co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE)) {
- coroutine_wrapper = PyEval_GetCoroutineWrapper();
+ coroutine_wrapper = _PyEval_GetCoroutineWrapper();
if (coroutine_wrapper != NULL) {
PyObject *wrapped =
PyObject_CallFunction(coroutine_wrapper, "N", gen);
}
void
-PyEval_SetCoroutineWrapper(PyObject *wrapper)
+_PyEval_SetCoroutineWrapper(PyObject *wrapper)
{
PyThreadState *tstate = PyThreadState_GET();
}
PyObject *
-PyEval_GetCoroutineWrapper(void)
+_PyEval_GetCoroutineWrapper(void)
{
PyThreadState *tstate = PyThreadState_GET();
return tstate->coroutine_wrapper;
Py_TYPE(wrapper)->tp_name);
return NULL;
}
- PyEval_SetCoroutineWrapper(wrapper);
+ _PyEval_SetCoroutineWrapper(wrapper);
}
else {
- PyEval_SetCoroutineWrapper(NULL);
+ _PyEval_SetCoroutineWrapper(NULL);
}
Py_RETURN_NONE;
}
static PyObject *
sys_get_coroutine_wrapper(PyObject *self, PyObject *args)
{
- PyObject *wrapper = PyEval_GetCoroutineWrapper();
+ PyObject *wrapper = _PyEval_GetCoroutineWrapper();
if (wrapper == NULL) {
wrapper = Py_None;
}