gh-76785: Improved Subinterpreters Compatibility with 3.12 (1/2) (gh-126704)

These changes makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12.

This involves the following:

* rename several structs and typedefs
* add several typedefs
* stop using the PyThreadState.state field directly in parking_lot.c
This commit is contained in:
Eric Snow 2024-11-11 15:58:46 -07:00 committed by GitHub
parent 036930d844
commit a6d48e8f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 55 additions and 43 deletions

View file

@ -11,7 +11,7 @@ extern "C" {
#include "pycore_atexit.h" // struct _atexit_runtime_state
#include "pycore_audit.h" // _Py_AuditHookEntry
#include "pycore_ceval_state.h" // struct _ceval_runtime_state
#include "pycore_crossinterp.h" // struct _xidregistry
#include "pycore_crossinterp.h" // _PyXI_global_state_t
#include "pycore_debug_offsets.h" // _Py_DebugOffsets
#include "pycore_faulthandler.h" // struct _faulthandler_runtime_state
#include "pycore_floatobject.h" // struct _Py_float_runtime_state
@ -106,7 +106,7 @@ typedef struct pyruntimestate {
tools. */
/* cross-interpreter data and utils */
struct _xi_runtime_state xi;
_PyXI_global_state_t xi;
struct _pymem_allocators allocators;
struct _obmalloc_global_state obmalloc;