]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45953: Statically initialize the small ints. (gh-30092)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 14 Dec 2021 01:04:05 +0000 (18:04 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Dec 2021 01:04:05 +0000 (18:04 -0700)
commit121f1f893a39d0b58d3d2b5597505c154ecaac2a
tree2efda2489f892c98015cf80763369ea4f3505666
parentcb589d1b6bad4b75852c2e2a471a3800d5efdca7
bpo-45953: Statically initialize the small ints. (gh-30092)

The array of small PyLong objects has been statically declared. Here I also statically initialize them. Consequently they are no longer initialized dynamically during runtime init.

I've also moved them under a new sub-struct in _PyRuntimeState, in preparation for static allocation and initialization of other global objects.

https://bugs.python.org/issue45953
Include/internal/pycore_global_objects.h [new file with mode: 0644]
Include/internal/pycore_long.h
Include/internal/pycore_long_state.h [deleted file]
Include/internal/pycore_runtime.h
Makefile.pre.in
Objects/longobject.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Python/pylifecycle.c