diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-06 07:53:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-06 07:53:44 (GMT) |
commit | 35d6540c904ef07b8602ff014e520603f84b5886 (patch) | |
tree | 043aa48a925bf280fd2667aa3a3c62aa2e7fd5e6 /Include | |
parent | e5894ca8fd05e6a6df1033025b9093b68baa718d (diff) | |
download | cpython-35d6540c904ef07b8602ff014e520603f84b5886.zip cpython-35d6540c904ef07b8602ff014e520603f84b5886.tar.gz cpython-35d6540c904ef07b8602ff014e520603f84b5886.tar.bz2 |
bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422)
This reverts commit ea251806b8dffff11b30d2182af1e589caf88acf.
Keep "assert(interned == NULL);" in _PyUnicode_Fini(), but only for
the main interpreter.
Keep _PyUnicode_ClearInterned() changes avoiding the creation of a
temporary Python list object.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_unicodeobject.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h index c50c420..97d11ae 100644 --- a/Include/internal/pycore_unicodeobject.h +++ b/Include/internal/pycore_unicodeobject.h @@ -48,21 +48,11 @@ struct _Py_unicode_state { PyObject *latin1[256]; struct _Py_unicode_fs_codec fs_codec; - /* This dictionary holds all interned unicode strings. Note that references - to strings in this dictionary are *not* counted in the string's ob_refcnt. - When the interned string reaches a refcnt of 0 the string deallocation - function will delete the reference from this dictionary. - - Another way to look at this is that to say that the actual reference - count of a string is: s->ob_refcnt + (s->state ? 2 : 0) - */ - PyObject *interned; - // Unicode identifiers (_Py_Identifier): see _PyUnicode_FromId() struct _Py_unicode_ids ids; }; -extern void _PyUnicode_ClearInterned(PyInterpreterState *); +extern void _PyUnicode_ClearInterned(PyInterpreterState *interp); #ifdef __cplusplus |