2017-09-07 23:51:28 -06:00
|
|
|
#ifndef Py_INTERNAL_WARNINGS_H
|
|
|
|
#define Py_INTERNAL_WARNINGS_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-17 23:02:26 +02:00
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
2018-11-09 13:03:37 +01:00
|
|
|
#endif
|
|
|
|
|
2017-09-07 23:51:28 -06:00
|
|
|
struct _warnings_runtime_state {
|
|
|
|
/* Both 'filters' and 'onceregistry' can be set in warnings.py;
|
|
|
|
get_warnings_attr() will reset these variables accordingly. */
|
|
|
|
PyObject *filters; /* List */
|
|
|
|
PyObject *once_registry; /* Dict */
|
|
|
|
PyObject *default_action; /* String */
|
2024-03-28 16:05:08 +01:00
|
|
|
struct _PyMutex mutex;
|
2017-09-07 23:51:28 -06:00
|
|
|
long filters_version;
|
|
|
|
};
|
|
|
|
|
2021-02-19 15:10:45 +01:00
|
|
|
extern int _PyWarnings_InitState(PyInterpreterState *interp);
|
2020-03-02 15:02:18 +01:00
|
|
|
|
2023-07-25 04:25:45 +02:00
|
|
|
extern PyObject* _PyWarnings_Init(void);
|
2021-10-19 01:31:57 +02:00
|
|
|
|
|
|
|
extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro);
|
2023-05-26 16:53:29 +05:30
|
|
|
extern void _PyErr_WarnUnawaitedAgenMethod(PyAsyncGenObject *agen, PyObject *method);
|
2021-10-19 01:31:57 +02:00
|
|
|
|
2017-09-07 23:51:28 -06:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_WARNINGS_H */
|