pycore_warnings.h 740 B

1234567891011121314151617181920212223242526272829
  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. struct _warnings_runtime_state {
  10. /* Both 'filters' and 'onceregistry' can be set in warnings.py;
  11. get_warnings_attr() will reset these variables accordingly. */
  12. PyObject *filters; /* List */
  13. PyObject *once_registry; /* Dict */
  14. PyObject *default_action; /* String */
  15. long filters_version;
  16. };
  17. extern int _PyWarnings_InitState(PyInterpreterState *interp);
  18. PyAPI_FUNC(PyObject*) _PyWarnings_Init(void);
  19. extern void _PyErr_WarnUnawaitedCoroutine(PyObject *coro);
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif /* !Py_INTERNAL_WARNINGS_H */