mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Factor out a double lookup.
This commit is contained in:
parent
4a7ad1a27d
commit
0690512a7d
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue