bpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241)

Remove the PyEval_ReInitThreads() function from the Python C API.
It should not be called explicitly: use PyOS_AfterFork_Child()
instead.

Rename PyEval_ReInitThreads() to _PyEval_ReInitThreads() and add a
'runtime' parameter.
This commit is contained in:
Victor Stinner 2019-05-13 12:35:37 +02:00 committed by GitHub
parent 3aef48e315
commit d5d9e81ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 7 deletions

View file

@ -289,9 +289,8 @@ PyEval_ReleaseThread(PyThreadState *tstate)
*/
void
PyEval_ReInitThreads(void)
_PyEval_ReInitThreads(_PyRuntimeState *runtime)
{
_PyRuntimeState *runtime = &_PyRuntime;
struct _ceval_runtime_state *ceval = &runtime->ceval;
if (!gil_created(&ceval->gil)) {
return;