summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-06-27 18:33:01 (GMT)
committerGitHub <noreply@github.com>2023-06-27 18:33:01 (GMT)
commit20315d141a2288c43273922213863b4594e8ab42 (patch)
tree6bb81b6eac6adf449e370c99c3dbaafb5c602006 /Include
parentac80beb1ec7b888244c98b122ccae5474ed46858 (diff)
downloadcpython-20315d141a2288c43273922213863b4594e8ab42.zip
cpython-20315d141a2288c43273922213863b4594e8ab42.tar.gz
cpython-20315d141a2288c43273922213863b4594e8ab42.tar.bz2
[3.12] gh-106140: Reorder some more fields to facilitate out-of-process inspection (GH-106148) (#106155)
(cherry picked from commit 9126a6a9ce3772d5dc785cbee159b07a1ff7d531)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_interp.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index b12dd95..619225c 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -103,14 +103,19 @@ struct _is {
basis. Also see _PyRuntimeState regarding the various mutex fields.
*/
- /* The per-interpreter GIL, which might not be used. */
- struct _gil_runtime_state _gil;
-
// Dictionary of the sys module
PyObject *sysdict;
+
// Dictionary of the builtins module
PyObject *builtins;
+ struct _ceval_state ceval;
+
+ struct _import_state imports;
+
+ /* The per-interpreter GIL, which might not be used. */
+ struct _gil_runtime_state _gil;
+
/* ---------- IMPORTANT ---------------------------
The fields above this line are declared as early as
possible to facilitate out-of-process observability
@@ -147,12 +152,8 @@ struct _is {
struct _warnings_runtime_state warnings;
struct atexit_state atexit;
- struct _ceval_state ceval;
-
struct _obmalloc_state obmalloc;
- struct _import_state imports;
-
PyObject *audit_hooks;
PyType_WatchCallback type_watchers[TYPE_MAX_WATCHERS];
PyCode_WatchCallback code_watchers[CODE_MAX_WATCHERS];