commit | 5fd4bd3796a220932c6148de2d08589a7f1b93d6 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Sun Mar 06 09:06:34 2011 -0600 |
committer | Benjamin Peterson <benjamin@python.org> | Sun Mar 06 09:06:34 2011 -0600 |
tree | 3f3fc02f81a525fa69b94be3977f602cfccd5924 | |
parent | c1423892182bde25e76acde1702ad266ba12be7e [diff] [blame] |
avoid casting with this nice macro
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1d0e97b..db9f706 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -7358,8 +7358,7 @@ if (PyUnicode_Check(left) && PyUnicode_Check(right)) { PyObject *v; - if (((PyUnicodeObject *) left)->length != - ((PyUnicodeObject *) right)->length) { + if (PyUnicode_GET_SIZE(left) != PyUnicode_GET_SIZE(right)) { if (op == Py_EQ) { Py_INCREF(Py_False); return Py_False;