pycore_warnings.h 591 B

12345678910111213141516171819202122232425
  1. #ifndef Py_INTERNAL_WARNINGS_H
  2. #define Py_INTERNAL_WARNINGS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifndef Py_BUILD_CORE
  7. # error "this header requires Py_BUILD_CORE define"
  8. #endif
  9. #include "object.h"
  10. struct _warnings_runtime_state {
  11. /* Both 'filters' and 'onceregistry' can be set in warnings.py;
  12. get_warnings_attr() will reset these variables accordingly. */
  13. PyObject *filters; /* List */
  14. PyObject *once_registry; /* Dict */
  15. PyObject *default_action; /* String */
  16. long filters_version;
  17. };
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif /* !Py_INTERNAL_WARNINGS_H */