1 | #ifndef Py_WARNINGS_H |
2 | #define Py_WARNINGS_H |
3 | #ifdef __cplusplus |
4 | extern "C" { |
5 | #endif |
6 | |
7 | #ifndef Py_LIMITED_API |
8 | PyAPI_FUNC(PyObject*) _PyWarnings_Init(void); |
9 | #endif |
10 | |
11 | PyAPI_FUNC(int) PyErr_WarnEx( |
12 | PyObject *category, |
13 | const char *message, /* UTF-8 encoded string */ |
14 | Py_ssize_t stack_level); |
15 | PyAPI_FUNC(int) PyErr_WarnFormat( |
16 | PyObject *category, |
17 | Py_ssize_t stack_level, |
18 | const char *format, /* ASCII-encoded string */ |
19 | ...); |
20 | #ifndef Py_LIMITED_API |
21 | PyAPI_FUNC(int) PyErr_WarnExplicitObject( |
22 | PyObject *category, |
23 | PyObject *message, |
24 | PyObject *filename, |
25 | int lineno, |
26 | PyObject *module, |
27 | PyObject *registry); |
28 | #endif |
29 | PyAPI_FUNC(int) PyErr_WarnExplicit( |
30 | PyObject *category, |
31 | const char *message, /* UTF-8 encoded string */ |
32 | const char *filename, /* decoded from the filesystem encoding */ |
33 | int lineno, |
34 | const char *module, /* UTF-8 encoded string */ |
35 | PyObject *registry); |
36 | |
37 | #ifndef Py_LIMITED_API |
38 | PyAPI_FUNC(int) |
39 | PyErr_WarnExplicitFormat(PyObject *category, |
40 | const char *filename, int lineno, |
41 | const char *module, PyObject *registry, |
42 | const char *format, ...); |
43 | #endif |
44 | |
45 | /* DEPRECATED: Use PyErr_WarnEx() instead. */ |
46 | #ifndef Py_LIMITED_API |
47 | #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) |
48 | #endif |
49 | |
50 | #ifdef __cplusplus |
51 | } |
52 | #endif |
53 | #endif /* !Py_WARNINGS_H */ |
54 | |
55 | |