diff options
author | Raymond Hettinger <python@rcn.com> | 2003-11-08 11:35:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-11-08 11:35:22 (GMT) |
commit | c24c9106e826aa3a6d64c60b76ee015210aea2d1 (patch) | |
tree | e08009524d3577e65ec7f42c9bf9d315cd0062bf /Objects | |
parent | b3af1813eb5cf99766f55a0dfc0d566e9bd7c3c1 (diff) | |
download | cpython-c24c9106e826aa3a6d64c60b76ee015210aea2d1.zip cpython-c24c9106e826aa3a6d64c60b76ee015210aea2d1.tar.gz cpython-c24c9106e826aa3a6d64c60b76ee015210aea2d1.tar.bz2 |
Minor code fixup. Make sure that len reflects the current list size.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/listobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index cf00ab2..7198e34 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1968,6 +1968,7 @@ fail: merge_freemem(&ms); if (keyfunc != NULL) { + len = PyList_GET_SIZE(self); for (i=0 ; i < len ; i++) { kvpair = PyList_GET_ITEM(self, i); value = sortwrapper_getvalue(kvpair); |