summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-12 11:44:53 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-12 11:44:53 (GMT)
commit46fc337395753e5b927f6dcccc549c54550b197e (patch)
tree36c450714b34d4ee7f5ae1d1490d4a1ecac254e8 /Objects/unicodeobject.c
parent447e7c398158323af7757def0cf715fabfc707fa (diff)
downloadcpython-46fc337395753e5b927f6dcccc549c54550b197e.zip
cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.gz
cpython-46fc337395753e5b927f6dcccc549c54550b197e.tar.bz2
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 8288f1e..6b27adb 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5990,15 +5990,16 @@ PyObject *PyUnicode_RichCompare(PyObject *left,
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);