diff options
author | Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> | 2019-09-05 16:06:49 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-09-05 16:06:49 (GMT) |
commit | 2bc43cdc015eda4f1a651bb2b308a17a83c38e14 (patch) | |
tree | 1a3a998656035eedb1e30c033f7fc3bb3156cdd9 /Python | |
parent | 2c2b561967c1916855399f809e30ae0ba7e09ae2 (diff) | |
download | cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.zip cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.tar.gz cpython-2bc43cdc015eda4f1a651bb2b308a17a83c38e14.tar.bz2 |
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')
-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 dc52400..02bc903 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. |