From dacde0d6ae72451ef102aa98ca36b733277d15bb Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 26 May 2008 17:43:53 +0000 Subject: turn PyErr_WarnPy3k into a macro --- Include/warnings.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Include/warnings.h') 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) -- cgit v1.2.1