2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifndef Py_INTERNAL_RUNTIME_INIT_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define Py_INTERNAL_RUNTIME_INIT_H
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef __cplusplus
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extern "C" {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifndef Py_BUILD_CORE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  error "this header requires Py_BUILD_CORE define"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-17 09:19:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_structs.h"
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-21 20:05:59 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_ceval_state.h"   // _PyEval_RUNTIME_PERF_INIT
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-18 09:26:08 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_debug_offsets.h"  // _Py_DebugOffsets_INIT()
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-19 18:46:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_dtoa.h"          // _dtoa_state_INIT()
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-21 20:05:59 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_faulthandler.h"  // _faulthandler_runtime_state_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_floatobject.h"   // _py_float_format_unknown
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-08 07:04:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_function.h"
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-17 09:19:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_hamt.h"          // _PyHamt_BitmapNode_Type
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-19 23:01:32 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_import.h"        // IMPORTS_INIT
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-21 20:05:59 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_object.h"        // _PyObject_HEAD_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_obmalloc_init.h" // _obmalloc_global_state_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_parser.h"        // _parser_runtime_state_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_pyhash.h"        // pyhash_state_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_pymem_init.h"    // _pymem_allocators_standard_INIT
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-06 14:45:04 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_pythread.h"      // _pythread_RUNTIME_INIT
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-16 15:25:19 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_qsbr.h"          // QSBR_INITIAL
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-21 20:05:59 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_runtime_init_generated.h"  // _Py_bytes_characters_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_signal.h"        // _signals_RUNTIME_INIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "pycore_tracemalloc.h"   // _tracemalloc_runtime_state_INIT
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-06 19:40:09 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								extern PyTypeObject _PyExc_MemoryError;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/* The static initializers defined here should only be used
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   in the runtime init code (in pystate.c and pylifecycle.c). */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-15 19:42:41 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define _PyRuntimeState_INIT(runtime, debug_cookie) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-18 09:26:08 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .debug_offsets = _Py_DebugOffsets_INIT(debug_cookie), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 16:30:46 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .allocators = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-08 14:06:54 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .standard = _pymem_allocators_standard_INIT(runtime), \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .debug = _pymem_allocators_debug_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .obj_arena = _pymem_allocators_obj_arena_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-16 16:42:15 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .is_debug_enabled = _pymem_is_debug_enabled_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 16:30:46 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-24 17:23:57 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .obmalloc = _obmalloc_global_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:37:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .pyhash_state = pyhash_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-06 14:45:04 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .threads = _pythread_RUNTIME_INIT(runtime.threads), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-12 16:50:19 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .signals = _signals_RUNTIME_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 16:33:40 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .interpreters = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* This prevents interpreters from getting created \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              until _PyInterpreterState_Enable() is called. */ \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .next_id = -1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 17:36:40 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .xi = { \
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-07 09:32:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .data_lookup = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .registry = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    .global = 1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 17:36:40 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-19 16:04:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        /* A TSS key must be initialized with Py_tss_NEEDS_INIT \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								           in accordance with the specification. */ \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .autoTSSkey = Py_tss_NEEDS_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-16 06:48:03 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .parser = _parser_runtime_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 17:17:20 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .ceval = { \
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 19:05:51 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .pending_mainthread = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .max = MAXPENDINGCALLS_MAIN, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .maxloop = MAXPENDINGCALLSLOOP_MAIN, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 17:17:20 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .perf = _PyEval_RUNTIME_PERF_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:37:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .gilstate = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .check_enabled = 1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .fileutils = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .force_ascii = -1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-12 09:58:46 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .faulthandler = _faulthandler_runtime_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-12 08:44:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .tracemalloc = _tracemalloc_runtime_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-02 19:30:00 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .ref_tracer = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .tracer_func = NULL, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .tracer_data = NULL, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-23 13:08:23 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .stoptheworld = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .is_global = 1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:37:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .float_state = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .float_format = _py_float_format_unknown, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .double_format = _py_float_format_unknown, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .types = { \
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-08 16:44:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .next_version_tag = _Py_TYPE_VERSION_NEXT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:37:14 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-14 11:53:57 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .static_objects = { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 13:23:41 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .singletons = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .small_ints = _Py_small_ints_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .bytes_empty = _PyBytes_SIMPLE_INIT(0, 0), \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .bytes_characters = _Py_bytes_characters_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .strings = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    .literals = _Py_str_literals_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    .identifiers = _Py_str_identifiers_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    .ascii = _Py_str_ascii_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    .latin1 = _Py_str_latin1_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .tuple_empty = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .ob_base = _PyVarObject_HEAD_INIT(&PyTuple_Type, 0), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 13:23:41 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:54:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                .hamt_bitmap_node_empty = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .ob_base = _PyVarObject_HEAD_INIT(&_PyHamt_BitmapNode_Type, 0), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:54:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .context_token_missing = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .ob_base = _PyObject_HEAD_INIT(&_PyContextTokenMissing_Type), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:54:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 13:23:41 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-28 13:14:40 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._main_interpreter = _PyInterpreterState_INIT(runtime._main_interpreter), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-28 13:14:40 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define _PyInterpreterState_INIT(INTERP) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .id_refcount = -1, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-10 18:37:01 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._whence = _PyInterpreterState_WHENCE_NOTSET, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-19 12:59:19 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .threads = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .preallocated = &(INTERP)._initial_thread, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-15 15:32:31 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .imports = IMPORTS_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .ceval = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .recursion_limit = Py_DEFAULT_RECURSION_LIMIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 19:05:51 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .pending = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .max = MAXPENDINGCALLS, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                .maxloop = MAXPENDINGCALLSLOOP, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .gc = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .enabled = 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-20 08:54:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .young = { .threshold = 2000, }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .old = { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                { .threshold = 10, }, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-20 08:54:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                { .threshold = 0, }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-20 08:54:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .work_to_do = -5000, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-02 10:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .phase = GC_PHASE_MARK, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:17:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-16 15:25:19 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .qsbr = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .wr_seq = QSBR_INITIAL, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .rd_seq = QSBR_INITIAL, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-28 13:14:40 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .dtoa = _dtoa_state_INIT(&(INTERP)), \
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-10 07:28:40 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .dict_state = _dict_state_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 13:04:37 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .mem_free_queue = _Py_mem_free_queue_INIT(INTERP.mem_free_queue), \
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-08 15:56:36 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .func_state = { \
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-08 07:04:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .next_version = FUNC_VERSION_FIRST_VALID, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-08 15:56:36 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-24 16:30:13 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .types = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .next_version_tag = _Py_TYPE_BASE_VERSION_TAG, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 14:24:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .static_objects = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .singletons = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ._not_used = 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:54:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                .hamt_empty = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .ob_base = _PyObject_HEAD_INIT(&_PyHamt_Type), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-16 09:54:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .h_root = (PyHamtNode*)&_Py_SINGLETON(hamt_bitmap_node_empty), \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-06 19:40:09 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                .last_resort_memory_error = { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyObject_HEAD_INIT(&_PyExc_MemoryError), \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-24 02:06:59 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    .args = (PyObject*)&_Py_SINGLETON(tuple_empty) \
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-06 19:40:09 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-11 14:24:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 14:11:45 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._initial_thread = _PyThreadStateImpl_INIT, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define _PyThreadStateImpl_INIT \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .base = _PyThreadState_INIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-06 10:38:34 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        /* The thread and the interpreter's linked list hold a reference */ \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .refcount = 2, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define _PyThreadState_INIT \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-03 09:20:48 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._whence = _PyThreadState_WHENCE_NOTSET, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-05 01:34:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .py_recursion_limit = Py_DEFAULT_RECURSION_LIMIT, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 17:09:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .context_ver = 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// global objects
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define _PyBytes_SIMPLE_INIT(CH, LEN) \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        _PyVarObject_HEAD_INIT(&PyBytes_Type, (LEN)), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .ob_shash = -1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .ob_sval = { (CH) }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define _PyBytes_CHAR_INIT(CH) \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        _PyBytes_SIMPLE_INIT((CH), 1) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define _PyUnicode_ASCII_BASE_INIT(LITERAL, ASCII) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-08 13:39:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-30 12:06:09 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .ob_base = _PyObject_HEAD_INIT(&PyUnicode_Type), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        .length = sizeof(LITERAL) - 1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .hash = -1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        .state = { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .kind = 1, \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .compact = 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .ascii = (ASCII), \
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-27 13:56:59 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .statically_allocated = 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-08 13:39:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define _PyASCIIObject_INIT(LITERAL) \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._ascii = _PyUnicode_ASCII_BASE_INIT((LITERAL), 1), \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ._data = (LITERAL) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-08 13:39:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define INIT_STR(NAME, LITERAL) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-08 01:36:23 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    ._py_ ## NAME = _PyASCIIObject_INIT(LITERAL)
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-08 13:39:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define INIT_ID(NAME) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-08 01:36:23 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    ._py_ ## NAME = _PyASCIIObject_INIT(#NAME)
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-03 12:13:08 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define _PyUnicode_LATIN1_INIT(LITERAL, UTF8) \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    { \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ._latin1 = { \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            ._base = _PyUnicode_ASCII_BASE_INIT((LITERAL), 0), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-03 12:13:08 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            .utf8 = (UTF8), \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            .utf8_length = sizeof(UTF8) - 1, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }, \
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-20 16:04:52 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        ._data = (LITERAL), \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-10 04:32:00 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-27 11:06:09 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-08 01:34:05 +05:30
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "pycore_runtime_init_generated.h"
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:54:36 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef __cplusplus
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif /* !Py_INTERNAL_RUNTIME_INIT_H */
							 |