diff options
author | sweeneyde <36520290+sweeneyde@users.noreply.github.com> | 2020-02-26 07:00:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 07:00:35 (GMT) |
commit | be7ead62db9a1db3e2cd997b0beffd4480e51f5c (patch) | |
tree | 6e01cef32c63ff201305eb29714adec87fa70f25 | |
parent | 57c7a0bdf4f7da8cf47f797f075950f6b8c98b99 (diff) | |
download | cpython-be7ead62db9a1db3e2cd997b0beffd4480e51f5c.zip cpython-be7ead62db9a1db3e2cd997b0beffd4480e51f5c.tar.gz cpython-be7ead62db9a1db3e2cd997b0beffd4480e51f5c.tar.bz2 |
bpo-39737: Remove code repitition in list_richcompare (GH-18638)
I may speed up list comparison on some platforms.
-rw-r--r-- | Objects/listobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 3c39c64..3ac03b7 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2643,8 +2643,7 @@ list_richcompare(PyObject *v, PyObject *w, int op) Py_INCREF(vitem); Py_INCREF(witem); - int k = PyObject_RichCompareBool(vl->ob_item[i], - wl->ob_item[i], Py_EQ); + int k = PyObject_RichCompareBool(vitem, witem, Py_EQ); Py_DECREF(vitem); Py_DECREF(witem); if (k < 0) |