blob: 79ef9f32e7d1620c2a2a393c36865478ca3dcd1c [file] [log] [blame]
Brett Cannone9746892008-04-12 23:44:07 +00001#ifndef Py_WARNINGS_H
2#define Py_WARNINGS_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7PyAPI_FUNC(void) _PyWarnings_Init(void);
8
9PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t);
10PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int,
11 const char *, PyObject *);
Benjamin Petersondacde0d2008-05-26 17:43:53 +000012
13#define PyErr_WarnPy3k(msg, stacklevel) (Py_Py3kWarningFlag ? PyErr_WarnEx(PyExc_DeprecationWarning, msg, stacklevel) : 0)
Brett Cannone9746892008-04-12 23:44:07 +000014
15/* DEPRECATED: Use PyErr_WarnEx() instead. */
16#define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1)
17
18#ifdef __cplusplus
19}
20#endif
Christian Heimes0a4f8952008-04-13 09:30:17 +000021#endif /* !Py_WARNINGS_H */
22