summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-11-08 11:35:22 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-11-08 11:35:22 (GMT)
commitc24c9106e826aa3a6d64c60b76ee015210aea2d1 (patch)
treee08009524d3577e65ec7f42c9bf9d315cd0062bf /Objects/listobject.c
parentb3af1813eb5cf99766f55a0dfc0d566e9bd7c3c1 (diff)
downloadcpython-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/listobject.c')
-rw-r--r--Objects/listobject.c1
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);