FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private · python/cpython@d8cf382 · GitHub

Repository navigation

Commit d8cf382

Browse files
Yury Selivanov
committed
Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper private
1 parent 0969a9f commit d8cf382

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎Include/ceval.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj,
2323
#ifndef Py_LIMITED_API
2424
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
2525
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
26-
PyAPI_FUNC(void) PyEval_SetCoroutineWrapper(PyObject *wrapper);
27-
PyAPI_FUNC(PyObject *) PyEval_GetCoroutineWrapper(void);
26+
PyAPI_FUNC(void) _PyEval_SetCoroutineWrapper(PyObject *wrapper);
27+
PyAPI_FUNC(PyObject *) _PyEval_GetCoroutineWrapper(void);
2828
#endif
2929

3030
struct _frame; /* Avoid including frameobject.h */

‎Python/ceval.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,7 +3936,7 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
39363936
return NULL;
39373937

39383938
if (co->co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE)) {
3939-
coroutine_wrapper = PyEval_GetCoroutineWrapper();
3939+
coroutine_wrapper = _PyEval_GetCoroutineWrapper();
39403940
if (coroutine_wrapper != NULL) {
39413941
PyObject *wrapped =
39423942
PyObject_CallFunction(coroutine_wrapper, "N", gen);
@@ -4390,7 +4390,7 @@ PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
43904390
}
43914391

43924392
void
4393-
PyEval_SetCoroutineWrapper(PyObject *wrapper)
4393+
_PyEval_SetCoroutineWrapper(PyObject *wrapper)
43944394
{
43954395
PyThreadState *tstate = PyThreadState_GET();
43964396

@@ -4401,7 +4401,7 @@ PyEval_SetCoroutineWrapper(PyObject *wrapper)
44014401
}
44024402

44034403
PyObject *
4404-
PyEval_GetCoroutineWrapper(void)
4404+
_PyEval_GetCoroutineWrapper(void)
44054405
{
44064406
PyThreadState *tstate = PyThreadState_GET();
44074407
return tstate->coroutine_wrapper;

‎Python/sysmodule.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,10 +655,10 @@ sys_set_coroutine_wrapper(PyObject *self, PyObject *wrapper)
655655
Py_TYPE(wrapper)->tp_name);
656656
return NULL;
657657
}
658-
PyEval_SetCoroutineWrapper(wrapper);
658+
_PyEval_SetCoroutineWrapper(wrapper);
659659
}
660660
else {
661-
PyEval_SetCoroutineWrapper(NULL);
661+
_PyEval_SetCoroutineWrapper(NULL);
662662
}
663663
Py_RETURN_NONE;
664664
}
@@ -672,7 +672,7 @@ Set a wrapper for coroutine objects."
672672
static PyObject *
673673
sys_get_coroutine_wrapper(PyObject *self, PyObject *args)
674674
{
675-
PyObject *wrapper = PyEval_GetCoroutineWrapper();
675+
PyObject *wrapper = _PyEval_GetCoroutineWrapper();
676676
if (wrapper == NULL) {
677677
wrapper = Py_None;
678678
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL