diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-16 16:37:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 16:37:14 (GMT) |
commit | 5f55067e238c21de25f09ece9bb24ae8c42d02b4 (patch) | |
tree | f3fbce5e16aaa3a8871518c4ccb18bc8a1d86e9e /Include/internal/pycore_runtime.h | |
parent | 5cfb7d19f5242c9b8ffd2fe30a24569e85a99e1d (diff) | |
download | cpython-5f55067e238c21de25f09ece9bb24ae8c42d02b4.zip cpython-5f55067e238c21de25f09ece9bb24ae8c42d02b4.tar.gz cpython-5f55067e238c21de25f09ece9bb24ae8c42d02b4.tar.bz2 |
gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)
https://github.com/python/cpython/issues/81057
Diffstat (limited to 'Include/internal/pycore_runtime.h')
-rw-r--r-- | Include/internal/pycore_runtime.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index 8b2b9d7..f8b9880 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -10,11 +10,13 @@ extern "C" { #include "pycore_atomic.h" /* _Py_atomic_address */ #include "pycore_dtoa.h" // struct _dtoa_runtime_state +#include "pycore_floatobject.h" // struct _Py_float_runtime_state #include "pycore_gil.h" // struct _gil_runtime_state #include "pycore_global_objects.h" // struct _Py_global_objects #include "pycore_import.h" // struct _import_runtime_state #include "pycore_interp.h" // PyInterpreterState #include "pycore_pymem.h" // struct _pymem_allocators +#include "pycore_pyhash.h" // struct pyhash_runtime_state #include "pycore_obmalloc.h" // struct obmalloc_state #include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids @@ -92,6 +94,12 @@ typedef struct pyruntimestate { struct _pymem_allocators allocators; struct _obmalloc_state obmalloc; + struct pyhash_runtime_state pyhash_state; + struct { + /* True if the main interpreter thread exited due to an unhandled + * KeyboardInterrupt exception, suggesting the user pressed ^C. */ + int unhandled_keyboard_interrupt; + } signals; struct pyinterpreters { PyThread_type_lock mutex; @@ -131,6 +139,7 @@ typedef struct pyruntimestate { struct _PyTraceMalloc_Config config; } tracemalloc; struct _dtoa_runtime_state dtoa; + struct _fileutils_state fileutils; PyPreConfig preconfig; @@ -140,7 +149,8 @@ typedef struct pyruntimestate { void *open_code_userdata; _Py_AuditHookEntry *audit_hook_head; - struct _Py_unicode_runtime_ids unicode_ids; + struct _Py_float_runtime_state float_state; + struct _Py_unicode_runtime_state unicode_state; struct { /* Used to set PyTypeObject.tp_version_tag */ |