summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-02-08 00:14:34 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-02-08 00:14:34 (GMT)
commit48397d6c2273769c26f4b8cef2a839a74d0da1a5 (patch)
treea13d913fe20a77a65ec5f8648bd7dd447c2f639e
parentf75dbef208673865b31d32d5a2196b15b1b03024 (diff)
downloadcpython-48397d6c2273769c26f4b8cef2a839a74d0da1a5.zip
cpython-48397d6c2273769c26f4b8cef2a839a74d0da1a5.tar.gz
cpython-48397d6c2273769c26f4b8cef2a839a74d0da1a5.tar.bz2
Use prefix decrement
-rw-r--r--Objects/dictobject.c4
-rw-r--r--Objects/listobject.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 9e2b944..eaa490e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -208,10 +208,10 @@ static int numfree = 0;
void
PyDict_Fini(void)
{
- PyListObject *op;
+ PyDictObject *op;
while (numfree) {
- op = free_list[numfree--];
+ op = free_list[--numfree];
assert(PyDict_CheckExact(op));
PyObject_GC_Del(op);
}
diff --git a/Objects/listobject.c b/Objects/listobject.c
index df7a405..d6a99b1 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -92,8 +92,7 @@ PyList_Fini(void)
PyListObject *op;
while (numfree) {
- numfree--;
- op = free_list[numfree];
+ op = free_list[--numfree];
assert(PyList_CheckExact(op));
PyObject_GC_Del(op);
}