]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-81057: Add PyInterpreterState.static_objects (gh-99397)
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 11 Nov 2022 21:24:18 +0000 (14:24 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Nov 2022 21:24:18 +0000 (14:24 -0700)
commitf531b6879b530515b009ac79767702829848cf07
treebf2fbc70bc62929ec8d8806acd284340d9a1b173
parentdd36b71fa6164ebba5d94bb4a24eac43b1c54906
gh-81057: Add PyInterpreterState.static_objects (gh-99397)

As we consolidate global variables, we find some objects that are almost suitable to add to _PyRuntimeState.global_objects, but have some small/sneaky bit of per-interpreter state (e.g. a weakref list). We're adding PyInterpreterState.static_objects so we can move such objects there. (We'll removed the _not_used field once we've added others.)

https://github.com/python/cpython/issues/81057
Include/internal/pycore_global_objects.h
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_interp.h
Include/internal/pycore_runtime_init.h
Python/pylifecycle.c
Tools/build/generate_global_objects.py