cpython: 1e9e0664ee9b (original) (raw)
Mercurial > cpython
changeset 96452:1e9e0664ee9b 3.5
Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private
Yury Selivanov yselivanov@sprymix.com | |
---|---|
date | Mon, 01 Jun 2015 12:15:23 -0400 |
parents | 5a354de919aa |
children | 6fcb64097b1c 22b77f859521 |
files | Include/ceval.h Python/ceval.c Python/sysmodule.c |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-)[+] [-] Include/ceval.h 4 Python/ceval.c 6 Python/sysmodule.c 6 |
line wrap: on
line diff
--- a/Include/ceval.h +++ b/Include/ceval.h @@ -23,8 +23,8 @@ PyAPI_FUNC(PyObject *) PyEval_CallMethod #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 */
--- a/Python/ceval.c +++ b/Python/ceval.c @@ -3936,7 +3936,7 @@ static PyObject * return NULL; if (co->co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE)) {
coroutine_wrapper = PyEval_GetCoroutineWrapper();[](#l2.7)
coroutine_wrapper = _PyEval_GetCoroutineWrapper();[](#l2.8) if (coroutine_wrapper != NULL) {[](#l2.9) PyObject *wrapped =[](#l2.10) PyObject_CallFunction(coroutine_wrapper, "N", gen);[](#l2.11)
@@ -4390,7 +4390,7 @@ PyEval_SetTrace(Py_tracefunc func, PyObj } void -PyEval_SetCoroutineWrapper(PyObject *wrapper) +_PyEval_SetCoroutineWrapper(PyObject *wrapper) { PyThreadState *tstate = PyThreadState_GET(); @@ -4401,7 +4401,7 @@ PyEval_SetCoroutineWrapper(PyObject *wra } PyObject * -PyEval_GetCoroutineWrapper(void) +_PyEval_GetCoroutineWrapper(void) { PyThreadState *tstate = PyThreadState_GET(); return tstate->coroutine_wrapper;
--- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -655,10 +655,10 @@ sys_set_coroutine_wrapper(PyObject *self Py_TYPE(wrapper)->tp_name); return NULL; }
PyEval_SetCoroutineWrapper(wrapper);[](#l3.7)
PyEval_SetCoroutineWrapper(NULL);[](#l3.11)