changeset: 96453:6fcb64097b1c parent: 96451:959e998aa167 parent: 96452:1e9e0664ee9b user: Yury Selivanov date: Mon Jun 01 12:15:47 2015 -0400 description: Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private diff -r 959e998aa167 -r 6fcb64097b1c Include/ceval.h --- a/Include/ceval.h Mon Jun 01 10:14:35 2015 -0500 +++ b/Include/ceval.h Mon Jun 01 12:15:47 2015 -0400 @@ -23,8 +23,8 @@ #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 */ diff -r 959e998aa167 -r 6fcb64097b1c Python/ceval.c --- a/Python/ceval.c Mon Jun 01 10:14:35 2015 -0500 +++ b/Python/ceval.c Mon Jun 01 12:15:47 2015 -0400 @@ -3936,7 +3936,7 @@ 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); @@ -4390,7 +4390,7 @@ } void -PyEval_SetCoroutineWrapper(PyObject *wrapper) +_PyEval_SetCoroutineWrapper(PyObject *wrapper) { PyThreadState *tstate = PyThreadState_GET(); @@ -4401,7 +4401,7 @@ } PyObject * -PyEval_GetCoroutineWrapper(void) +_PyEval_GetCoroutineWrapper(void) { PyThreadState *tstate = PyThreadState_GET(); return tstate->coroutine_wrapper; diff -r 959e998aa167 -r 6fcb64097b1c Python/sysmodule.c --- a/Python/sysmodule.c Mon Jun 01 10:14:35 2015 -0500 +++ b/Python/sysmodule.c Mon Jun 01 12:15:47 2015 -0400 @@ -655,10 +655,10 @@ Py_TYPE(wrapper)->tp_name); return NULL; } - PyEval_SetCoroutineWrapper(wrapper); + _PyEval_SetCoroutineWrapper(wrapper); } else { - PyEval_SetCoroutineWrapper(NULL); + _PyEval_SetCoroutineWrapper(NULL); } Py_RETURN_NONE; } @@ -672,7 +672,7 @@ static PyObject * sys_get_coroutine_wrapper(PyObject *self, PyObject *args) { - PyObject *wrapper = PyEval_GetCoroutineWrapper(); + PyObject *wrapper = _PyEval_GetCoroutineWrapper(); if (wrapper == NULL) { wrapper = Py_None; }