diff options
| author | Benjamin Peterson <benjamin@python.org> | 2008-05-26 17:43:53 +0000 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2008-05-26 17:43:53 +0000 |
| commit | dacde0d6ae72451ef102aa98ca36b733277d15bb (patch) | |
| tree | 5fe8889292d15688bca575f2e208d544ec7562ff /Include/warnings.h | |
| parent | eeb2b21ab0ecc3f10a51eea989ba6c2f1f01a9bd (diff) | |
| download | cpython-git-dacde0d6ae72451ef102aa98ca36b733277d15bb.tar.gz | |
turn PyErr_WarnPy3k into a macro
Diffstat (limited to 'Include/warnings.h')
| -rw-r--r-- | Include/warnings.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/warnings.h b/Include/warnings.h index e761adeb85..79ef9f32e7 100644 --- a/Include/warnings.h +++ b/Include/warnings.h @@ -9,7 +9,8 @@ PyAPI_FUNC(void) _PyWarnings_Init(void); PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int, const char *, PyObject *); -PyAPI_FUNC(int) PyErr_WarnPy3k(const char *, Py_ssize_t); + +#define PyErr_WarnPy3k(msg, stacklevel) (Py_Py3kWarningFlag ? PyErr_WarnEx(PyExc_DeprecationWarning, msg, stacklevel) : 0) /* DEPRECATED: Use PyErr_WarnEx() instead. */ #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) |
