Debian Codegraph @

Include/internal/pycore_warnings.h

raw
1 #ifndef Py_INTERNAL_WARNINGS_H
2 #define Py_INTERNAL_WARNINGS_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 struct _warnings_runtime_state {
12 /* Both 'filters' and 'onceregistry' can be set in warnings.py;
13 get_warnings_attr() will reset these variables accordingly. */
14 PyObject *filters; /* List */
15 PyObject *once_registry; /* Dict */
16 PyObject *default_action; /* String */
17 PyMutex mutex;
18 long filters_version;
19 };
20
21 extern int _PyWarnings_InitState(PyInterpreterState *interp);
22
23 extern PyObject* _PyWarnings_Init(void);
24
25 extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro);
26 extern void _PyErr_WarnUnawaitedAgenMethod(PyAsyncGenObject *agen, PyObject *method);
27
28 #ifdef __cplusplus
29 }
30 #endif
31 #endif /* !Py_INTERNAL_WARNINGS_H */