From 0690512a7d66dfdd8964e989e7cd1ea8f1d15228 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 19 Mar 2004 10:30:00 +0000 Subject: Factor out a double lookup. --- Objects/dictobject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 7afc576..3e36961 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1006,9 +1006,8 @@ dict_items(register dictobject *mp) ep = mp->ma_table; mask = mp->ma_mask; for (i = 0, j = 0; i <= mask; i++) { - if (ep[i].me_value != NULL) { + if ((value=ep[i].me_value) != NULL) { key = ep[i].me_key; - value = ep[i].me_value; item = PyList_GET_ITEM(v, j); Py_INCREF(key); PyTuple_SET_ITEM(item, 0, key); -- cgit v0.12