Kaydet (Commit) 5fd4bd37 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

avoid casting with this nice macro

üst c1423892
......@@ -7358,8 +7358,7 @@ PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment