]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38858: Small integer per interpreter (GH-17315)
authorVictor Stinner <vstinner@python.org>
Tue, 17 Dec 2019 12:02:18 +0000 (13:02 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Dec 2019 12:02:18 +0000 (13:02 +0100)
commit630c8df5cf126594f8c1c4579c1888ca80a29d59
tree7114d3190806b8b23b23211c0fdc8e0c507ff0c1
parentf501db2b93a9d3d840b6fb38d6bdda8bcc400d4a
bpo-38858: Small integer per interpreter (GH-17315)

Each Python subinterpreter now has its own "small integer
singletons": numbers in [-5; 257] range.

It is no longer possible to change the number of small integers at
build time by overriding NSMALLNEGINTS and NSMALLPOSINTS macros:
macros should now be modified manually in pycore_pystate.h header
file.

For now, continue to share _PyLong_Zero and _PyLong_One singletons
between all subinterpreters.
Include/internal/pycore_pylifecycle.h
Include/internal/pycore_pystate.h
Misc/NEWS.d/next/Core and Builtins/2019-11-21-09-02-49.bpo-38858.bDLH04.rst [new file with mode: 0644]
Objects/longobject.c
Python/pylifecycle.c