From 2bc43cdc015eda4f1a651bb2b308a17a83c38e14 Mon Sep 17 00:00:00 2001 From: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> Date: Thu, 5 Sep 2019 13:06:49 -0300 Subject: 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 --- Python/pystate.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index dc5240048b..02bc903943 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. -- cgit v1.2.1