mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
3c6d2d1230
commit
b697d8c48e
4 changed files with 83 additions and 60 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue