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 long filters_version; 18 }; 19 20 extern PyStatus _PyWarnings_InitState(PyThreadState *tstate); 21 22 #ifdef __cplusplus 23 } 24 #endif 25 #endif /* !Py_INTERNAL_WARNINGS_H */ 26