1 #ifndef Py_INTERNAL_EXCEPTIONS_H
2 #define Py_INTERNAL_EXCEPTIONS_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #ifndef Py_BUILD_CORE
8 #  error "this header requires Py_BUILD_CORE define"
9 #endif
10 
11 
12 /* runtime lifecycle */
13 
14 extern PyStatus _PyExc_InitState(PyInterpreterState *);
15 extern PyStatus _PyExc_InitGlobalObjects(PyInterpreterState *);
16 extern int _PyExc_InitTypes(PyInterpreterState *);
17 extern void _PyExc_Fini(PyInterpreterState *);
18 
19 
20 /* other API */
21 
22 struct _Py_exc_state {
23     // The dict mapping from errno codes to OSError subclasses
24     PyObject *errnomap;
25     PyBaseExceptionObject *memerrors_freelist;
26     int memerrors_numfree;
27     // The ExceptionGroup type
28     PyObject *PyExc_ExceptionGroup;
29 };
30 
31 extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *);
32 
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 #endif /* !Py_INTERNAL_EXCEPTIONS_H */
38