]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40521: Per-interpreter interned strings (GH-20085)
authorVictor Stinner <vstinner@python.org>
Sat, 26 Dec 2020 01:58:33 +0000 (02:58 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Dec 2020 01:58:33 +0000 (02:58 +0100)
commitea251806b8dffff11b30d2182af1e589caf88acf
tree10d413170c8e71dd19079b3d22eea4ebd5ddf7a5
parent993e88cf08994f7c1e0f9f62fda4ed32634ee2ad
bpo-40521: Per-interpreter interned strings (GH-20085)

Make the Unicode dictionary of interned strings compatible with
subinterpreters.

Remove the INTERN_NAME_STRINGS macro in typeobject.c: names are
always now interned (even if EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
macro is defined).

_PyUnicode_ClearInterned() now uses PyDict_Next() to no longer
allocate memory, to ensure that the interned dictionary is cleared.
Include/internal/pycore_interp.h
Misc/NEWS.d/next/Core and Builtins/2020-05-14-02-55-39.bpo-40521.dIlXsZ.rst [new file with mode: 0644]
Objects/typeobject.c
Objects/unicodeobject.c
Python/pylifecycle.c