gh-76785: Minor Cleanup of Exception-related Cross-interpreter State (gh-126602)

This change makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12.
This commit is contained in:
Eric Snow 2024-11-11 14:49:41 -07:00 committed by GitHub
parent 3c6d2d1230
commit b697d8c48e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 83 additions and 60 deletions

View file

@ -11,6 +11,7 @@ extern "C" {
#include "pycore_lock.h" // PyMutex
#include "pycore_pyerrors.h"
/**************/
/* exceptions */
/**************/
@ -163,8 +164,13 @@ struct _xi_state {
// heap types
_PyXIData_lookup_t data_lookup;
// heap types
PyObject *PyExc_NotShareableError;
struct xi_exceptions {
// static types
PyObject *PyExc_InterpreterError;
PyObject *PyExc_InterpreterNotFoundError;
// heap types
PyObject *PyExc_NotShareableError;
} exceptions;
};
extern PyStatus _PyXI_Init(PyInterpreterState *interp);