warnings.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef Py_WARNINGS_H
  2. #define Py_WARNINGS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. PyAPI_FUNC(int) PyErr_WarnEx(
  7. PyObject *category,
  8. const char *message, /* UTF-8 encoded string */
  9. Py_ssize_t stack_level);
  10. PyAPI_FUNC(int) PyErr_WarnFormat(
  11. PyObject *category,
  12. Py_ssize_t stack_level,
  13. const char *format, /* ASCII-encoded string */
  14. ...);
  15. #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
  16. /* Emit a ResourceWarning warning */
  17. PyAPI_FUNC(int) PyErr_ResourceWarning(
  18. PyObject *source,
  19. Py_ssize_t stack_level,
  20. const char *format, /* ASCII-encoded string */
  21. ...);
  22. #endif
  23. PyAPI_FUNC(int) PyErr_WarnExplicit(
  24. PyObject *category,
  25. const char *message, /* UTF-8 encoded string */
  26. const char *filename, /* decoded from the filesystem encoding */
  27. int lineno,
  28. const char *module, /* UTF-8 encoded string */
  29. PyObject *registry);
  30. #ifndef Py_LIMITED_API
  31. # define Py_CPYTHON_WARNINGS_H
  32. # include "cpython/warnings.h"
  33. # undef Py_CPYTHON_WARNINGS_H
  34. #endif
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* !Py_WARNINGS_H */