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