]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36710: Add PyInterpreterState.runtime field (GH-17270)
authorVictor Stinner <vstinner@python.org>
Wed, 20 Nov 2019 01:27:56 +0000 (02:27 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Nov 2019 01:27:56 +0000 (02:27 +0100)
commit01b1cc12e7c6a3d6a3d27ba7c731687d57aae92a
tree1d1afefdc486c063853678d126975fe2d019059f
parenteb1cbbff1cd8214836a492502e75e463ade6f673
bpo-36710: Add PyInterpreterState.runtime field (GH-17270)

Add PyInterpreterState.runtime field: reference to the _PyRuntime
global variable. This field exists to not have to pass runtime in
addition to tstate to a function.  Get runtime from tstate:
tstate->interp->runtime.

Remove "_PyRuntimeState *runtime" parameter from functions already
taking a "PyThreadState *tstate" parameter.

_PyGC_Init() first parameter becomes "PyThreadState *tstate".
Include/internal/pycore_pylifecycle.h
Include/internal/pycore_pystate.h
Modules/_threadmodule.c
Modules/gcmodule.c
Python/ceval.c
Python/pylifecycle.c
Python/pystate.c
Python/sysmodule.c