gh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (gh-99487)
This moves nearly all remaining object-holding globals in core code (other than static types). https://github.com/python/cpython/issues/81057
This commit is contained in:
4
Python/Python-ast.c
generated
4
Python/Python-ast.c
generated
@@ -263,6 +263,10 @@ void _PyAST_Fini(PyInterpreterState *interp)
|
||||
Py_CLEAR(state->vararg);
|
||||
Py_CLEAR(state->withitem_type);
|
||||
|
||||
if (_PyInterpreterState_Get() == _PyInterpreterState_Main()) {
|
||||
Py_CLEAR(_Py_CACHED_OBJECT(str_replace_inf));
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
state->initialized = -1;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user