bpo-36710: Add PyInterpreterState.runtime field by vstinner · Pull Request #17270 · python/cpython (original) (raw)

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".

https://bugs.python.org/issue36710