From 20315d141a2288c43273922213863b4594e8ab42 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Tue, 27 Jun 2023 19:33:01 +0100 Subject: [3.12] gh-106140: Reorder some more fields to facilitate out-of-process inspection (GH-106148) (#106155) (cherry picked from commit 9126a6a9ce3772d5dc785cbee159b07a1ff7d531) --- Doc/data/python3.12.abi | 190 +++++++++++++++++++-------------------- Include/internal/pycore_interp.h | 15 ++-- 2 files changed, 103 insertions(+), 102 deletions(-) diff --git a/Doc/data/python3.12.abi b/Doc/data/python3.12.abi index 52764c1..4cd130f 100644 --- a/Doc/data/python3.12.abi +++ b/Doc/data/python3.12.abi @@ -7570,19 +7570,19 @@ - + - + - + - + @@ -11113,7 +11113,7 @@ - + @@ -16004,7 +16004,7 @@ - + @@ -16015,7 +16015,7 @@ - + @@ -16072,175 +16072,175 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -16257,18 +16257,18 @@ - + - + - + - + - + @@ -17396,8 +17396,8 @@ - + @@ -24923,7 +24923,7 @@ - + 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]; -- cgit v0.12