/* the initial PyInterpreterState.threads.head */
_PyThreadStateImpl _initial_thread;
+ // _initial_thread should be the last field of PyInterpreterState.
+ // See https://github.com/python/cpython/issues/127117.
};
struct _Py_unicode_runtime_state unicode_state;
struct _types_runtime_state types;
+#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE)
+ // Used in "Python/emscripten_trampoline.c" to choose between type
+ // reflection trampoline and EM_JS trampoline.
+ bool wasm_type_reflection_available;
+#endif
+
/* All the objects that are shared by the runtime's interpreters. */
struct _Py_cached_objects cached_objects;
struct _Py_static_objects static_objects;
/* _PyRuntimeState.interpreters.main */
PyInterpreterState _main_interpreter;
-
-#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE)
- // Used in "Python/emscripten_trampoline.c" to choose between type
- // reflection trampoline and EM_JS trampoline.
- bool wasm_type_reflection_available;
-#endif
-
+ // _main_interpreter should be the last field of _PyRuntimeState.
+ // See https://github.com/python/cpython/issues/127117.
} _PyRuntimeState;