aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/internal/pycore_runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_runtime.h')
-rw-r--r--Include/internal/pycore_runtime.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h
index 39e30b785a3..bd88510d1f0 100644
--- a/Include/internal/pycore_runtime.h
+++ b/Include/internal/pycore_runtime.h
@@ -10,14 +10,8 @@ extern "C" {
#include "pycore_atomic.h" /* _Py_atomic_address */
#include "pycore_gil.h" // struct _gil_runtime_state
-
-#define _PY_NSMALLPOSINTS 257
-#define _PY_NSMALLNEGINTS 5
-
-// _PyLong_GetZero() and _PyLong_GetOne() must always be available
-#if _PY_NSMALLPOSINTS < 2
-# error "_PY_NSMALLPOSINTS must be greater than 1"
-#endif
+#include "pycore_long_state.h" // struct _Py_long_state
+#include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids
/* ceval state */
@@ -57,13 +51,6 @@ typedef struct _Py_AuditHookEntry {
void *userData;
} _Py_AuditHookEntry;
-struct _Py_unicode_runtime_ids {
- PyThread_type_lock lock;
- // next_index value must be preserved when Py_Initialize()/Py_Finalize()
- // is called multiple times: see _PyUnicode_FromId() implementation.
- Py_ssize_t next_index;
-};
-
/* Full Python runtime state */
typedef struct pyruntimestate {
@@ -114,12 +101,7 @@ typedef struct pyruntimestate {
unsigned long main_thread;
- /* Small integers are preallocated in this array so that they
- * can be shared.
- * The integers that are preallocated are those in the range
- *-_PY_NSMALLNEGINTS (inclusive) to _PY_NSMALLPOSINTS (not inclusive).
- */
- PyLongObject small_ints[_PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS];
+ struct _Py_long_state int_state;
#define NEXITFUNCS 32
void (*exitfuncs[NEXITFUNCS])(void);