summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_global_objects.h
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-03-28 18:52:28 (GMT)
committerGitHub <noreply@github.com>2023-03-28 18:52:28 (GMT)
commitba65a065cf07a7a9f53be61057a090f7311a5ad7 (patch)
tree279e23bf7b8b1cfbf9a1a976a086ca129bbbe5cf /Include/internal/pycore_global_objects.h
parent7703def37e4fa7d25c3d23756de8f527daa4e165 (diff)
downloadcpython-ba65a065cf07a7a9f53be61057a090f7311a5ad7.zip
cpython-ba65a065cf07a7a9f53be61057a090f7311a5ad7.tar.gz
cpython-ba65a065cf07a7a9f53be61057a090f7311a5ad7.tar.bz2
gh-100227: Move the Dict of Interned Strings to PyInterpreterState (gh-102339)
We can revisit the options for keeping it global later, if desired. For now the approach seems quite complex, so we've gone with the simpler isolation solution in the meantime. https://github.com/python/cpython/issues/100227
Diffstat (limited to 'Include/internal/pycore_global_objects.h')
-rw-r--r--Include/internal/pycore_global_objects.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/Include/internal/pycore_global_objects.h b/Include/internal/pycore_global_objects.h
index 9957da1..64d9384 100644
--- a/Include/internal/pycore_global_objects.h
+++ b/Include/internal/pycore_global_objects.h
@@ -23,13 +23,6 @@ extern "C" {
// Only immutable objects should be considered runtime-global.
// All others must be per-interpreter.
-#define _Py_CACHED_OBJECT(NAME) \
- _PyRuntime.cached_objects.NAME
-
-struct _Py_cached_objects {
- PyObject *interned_strings;
-};
-
#define _Py_GLOBAL_OBJECT(NAME) \
_PyRuntime.static_objects.NAME
#define _Py_SINGLETON(NAME) \
@@ -65,6 +58,8 @@ struct _Py_static_objects {
(interp)->cached_objects.NAME
struct _Py_interp_cached_objects {
+ PyObject *interned_strings;
+
/* AST */
PyObject *str_replace_inf;