Commit c24c9106 authored by Raymond Hettinger's avatar Raymond Hettinger

Minor code fixup. Make sure that len reflects the current list size.

parent b3af1813
...@@ -1968,6 +1968,7 @@ fail: ...@@ -1968,6 +1968,7 @@ fail:
merge_freemem(&ms); merge_freemem(&ms);
if (keyfunc != NULL) { if (keyfunc != NULL) {
len = PyList_GET_SIZE(self);
for (i=0 ; i < len ; i++) { for (i=0 ; i < len ; i++) {
kvpair = PyList_GET_ITEM(self, i); kvpair = PyList_GET_ITEM(self, i);
value = sortwrapper_getvalue(kvpair); value = sortwrapper_getvalue(kvpair);
......
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