]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initial...
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 11 Nov 2022 20:23:41 +0000 (13:23 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Nov 2022 20:23:41 +0000 (13:23 -0700)
commitfe55ff3f68d56e11526652a21d8fe27444f96224
treeeed6a52bbfd45c49373871142a17dde69b97362d
parent6abec1caffdba2e282b14fe57c6ce61974de4bbe
gh-81057: Generate a Separate Initializer For Each Part of the Global Objects Initializer (gh-99389)

Up until now we had a single generated initializer macro for all the statically declared global objects in _PyRuntimeState, including several one-offs (e.g. the empty tuple). The one-offs don't need to be generated, but were because we had one big initializer. Having separate initializers for set of generated global objects allows us to generate only the ones we need to.  This allows us to add initializers for one-off global objects without having to generate them.

https://github.com/python/cpython/issues/81057
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_runtime_init.h
Include/internal/pycore_runtime_init_generated.h
Tools/build/generate_global_objects.py