diff options
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. |