mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-100227: Move _str_replace_inf to PyInterpreterState (gh-102333)
https://github.com/python/cpython/issues/100227
This commit is contained in:
parent
f300a1fa4c
commit
880437d4ec
4 changed files with 20 additions and 14 deletions
|
|
@ -1484,9 +1484,7 @@ def generate_ast_fini(module_state, f):
|
|||
for s in module_state:
|
||||
f.write(" Py_CLEAR(state->" + s + ');\n')
|
||||
f.write(textwrap.dedent("""
|
||||
if (_PyInterpreterState_Get() == _PyInterpreterState_Main()) {
|
||||
Py_CLEAR(_Py_CACHED_OBJECT(str_replace_inf));
|
||||
}
|
||||
Py_CLEAR(_Py_INTERP_CACHED_OBJECT(interp, str_replace_inf));
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
state->initialized = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue