Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 42560:0fcc18aba385
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Sun, 12 Aug 2007 11:44:53 +0000 |
| parents | eeb37c9793ea |
| children | 1381046fe894 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Sun Aug 12 07:11:25 2007 +0000 +++ b/Objects/unicodeobject.c Sun Aug 12 11:44:53 2007 +0000 @@ -5990,15 +5990,16 @@ if (!PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) return NULL; PyErr_Clear(); - if (PyErr_Warn(PyExc_UnicodeWarning, - (op == Py_EQ) ? - "Unicode equal comparison " - "failed to convert both arguments to Unicode - " - "interpreting them as being unequal" : - "Unicode unequal comparison " - "failed to convert both arguments to Unicode - " - "interpreting them as being unequal" - ) < 0) + if (PyErr_WarnEx(PyExc_UnicodeWarning, + (op == Py_EQ) ? + "Unicode equal comparison " + "failed to convert both arguments to Unicode - " + "interpreting them as being unequal" + : + "Unicode unequal comparison " + "failed to convert both arguments to Unicode - " + "interpreting them as being unequal", + 1) < 0) return NULL; result = (op == Py_NE); return PyBool_FromLong(result);
