diff options
author | Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> | 2019-09-05 13:06:49 -0300 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-09-05 18:06:49 +0200 |
commit | 2bc43cdc015eda4f1a651bb2b308a17a83c38e14 (patch) | |
tree | 1a3a998656035eedb1e30c033f7fc3bb3156cdd9 /Python/pystate.c | |
parent | bpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700) (diff) | |
download | cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.tar.gz cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.tar.bz2 cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.zip |
bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315)
* Rename PyThreadState_DeleteCurrent()
to _PyThreadState_DeleteCurrent()
* Move it to the internal C API
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index dc5240048ba..02bc9039436 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -809,7 +809,7 @@ PyThreadState_Clear(PyThreadState *tstate) } -/* Common code for PyThreadState_Delete() and PyThreadState_DeleteCurrent() */ +/* Common code for PyThreadState_Delete() and _PyThreadState_DeleteCurrent() */ static void tstate_delete_common(_PyRuntimeState *runtime, PyThreadState *tstate) { @@ -858,14 +858,14 @@ PyThreadState_Delete(PyThreadState *tstate) } -static void +void _PyThreadState_DeleteCurrent(_PyRuntimeState *runtime) { struct _gilstate_runtime_state *gilstate = &runtime->gilstate; PyThreadState *tstate = _PyRuntimeGILState_GetThreadState(gilstate); if (tstate == NULL) Py_FatalError( - "PyThreadState_DeleteCurrent: no current tstate"); + "_PyThreadState_DeleteCurrent: no current tstate"); tstate_delete_common(runtime, tstate); if (gilstate->autoInterpreterState && PyThread_tss_get(&gilstate->autoTSSkey) == tstate) @@ -876,12 +876,6 @@ _PyThreadState_DeleteCurrent(_PyRuntimeState *runtime) PyEval_ReleaseLock(); } -void -PyThreadState_DeleteCurrent() -{ - _PyThreadState_DeleteCurrent(&_PyRuntime); -} - /* * Delete all thread states except the one passed as argument. |