warnings.h 953 Bytes
Newer Older
Christian Heimes's avatar
Christian Heimes committed
1 2 3 4 5 6
#ifndef Py_WARNINGS_H
#define Py_WARNINGS_H
#ifdef __cplusplus
extern "C" {
#endif

7
#ifndef Py_LIMITED_API
8
PyAPI_FUNC(PyObject*) _PyWarnings_Init(void);
9
#endif
Christian Heimes's avatar
Christian Heimes committed
10

11 12 13 14 15 16 17 18 19 20 21 22
PyAPI_FUNC(int) PyErr_WarnEx(
    PyObject *category,
    const char *message,        /* UTF-8 encoded string */
    Py_ssize_t stack_level);
PyAPI_FUNC(int) PyErr_WarnFormat(
    PyObject *category,
    Py_ssize_t stack_level,
    const char *format,         /* ASCII-encoded string  */
    ...);
PyAPI_FUNC(int) PyErr_WarnExplicit(
    PyObject *category,
    const char *message,        /* UTF-8 encoded string */
23
    const char *filename,       /* decoded from the filesystem encoding */
24 25 26
    int lineno,
    const char *module,         /* UTF-8 encoded string */
    PyObject *registry);
Christian Heimes's avatar
Christian Heimes committed
27 28

/* DEPRECATED: Use PyErr_WarnEx() instead. */
29
#ifndef Py_LIMITED_API
Christian Heimes's avatar
Christian Heimes committed
30
#define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1)
31
#endif
Christian Heimes's avatar
Christian Heimes committed
32 33 34 35 36 37

#ifdef __cplusplus
}
#endif
#endif /* !Py_WARNINGS_H */