summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-03-27 16:53:05 -0600
committerGitHub <noreply@github.com>2023-03-27 16:53:05 -0600
commit89e67ada6958cfd8d4eec221848f81b2619de099 (patch)
treeaa6218f3ce5294b879837ef8b1e53740f03ff9ae /Include
parent34eb6f727632d9a1a6998f90c9421e420c785643 (diff)
downloadcpython-git-89e67ada6958cfd8d4eec221848f81b2619de099.tar.gz
gh-100227: Revert gh-102925 "gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters" (gh-103063)
This reverts commit 87be8d9. This approach to keeping the interned strings safe is turning out to be too complex for my taste (due to obmalloc isolation). For now I'm going with the simpler solution, making the dict per-interpreter. We can revisit that later if we want a sharing solution.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_global_objects.h4
-rw-r--r--Include/internal/pycore_pystate.h5
-rw-r--r--Include/internal/pycore_runtime_init.h3
-rw-r--r--Include/internal/pycore_unicodeobject.h1
4 files changed, 0 insertions, 13 deletions
diff --git a/Include/internal/pycore_global_objects.h b/Include/internal/pycore_global_objects.h
index 858321d67d..9957da1fc5 100644
--- a/Include/internal/pycore_global_objects.h
+++ b/Include/internal/pycore_global_objects.h
@@ -28,10 +28,6 @@ extern "C" {
struct _Py_cached_objects {
PyObject *interned_strings;
- /* A thread state tied to the main interpreter,
- used exclusively for when a global object (e.g. interned strings)
- is resized (i.e. deallocated + allocated) from an arbitrary thread. */
- PyThreadState main_tstate;
};
#define _Py_GLOBAL_OBJECT(NAME) \
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index f159b516e6..7046ec8d9a 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -127,11 +127,6 @@ PyAPI_FUNC(void) _PyThreadState_Init(
PyThreadState *tstate);
PyAPI_FUNC(void) _PyThreadState_DeleteExcept(PyThreadState *tstate);
-extern void _PyThreadState_InitDetached(PyThreadState *, PyInterpreterState *);
-extern void _PyThreadState_ClearDetached(PyThreadState *);
-
-extern PyObject * _Py_AddToGlobalDict(PyObject *, PyObject *, PyObject *);
-
static inline void
_PyThreadState_UpdateTracingState(PyThreadState *tstate)
diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h
index fd358b2da6..7cfa7c0c02 100644
--- a/Include/internal/pycore_runtime_init.h
+++ b/Include/internal/pycore_runtime_init.h
@@ -59,9 +59,6 @@ extern PyTypeObject _PyExc_MemoryError;
.types = { \
.next_version_tag = 1, \
}, \
- .cached_objects = { \
- .main_tstate = _PyThreadState_INIT, \
- }, \
.static_objects = { \
.singletons = { \
.small_ints = _Py_small_ints_INIT, \
diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h
index ed4feb603d..19faceebf1 100644
--- a/Include/internal/pycore_unicodeobject.h
+++ b/Include/internal/pycore_unicodeobject.h
@@ -34,7 +34,6 @@ struct _Py_unicode_runtime_ids {
struct _Py_unicode_runtime_state {
struct _Py_unicode_runtime_ids ids;
- /* The interned dict is at _PyRuntime.cached_objects.interned_strings. */
};
/* fs_codec.encoding is initialized to NULL.