summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-09-21 22:39:49 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-09-21 22:39:49 (GMT)
commit4ef0528b97f934a26d04e7956c9320635fa90b8c (patch)
tree702cc4eff511cbf27d9d40f333779059e63091df /Objects/setobject.c
parenta78cccb134d4438afa22fc6df532b5b9f888a8fa (diff)
downloadcpython-4ef0528b97f934a26d04e7956c9320635fa90b8c.zip
cpython-4ef0528b97f934a26d04e7956c9320635fa90b8c.tar.gz
cpython-4ef0528b97f934a26d04e7956c9320635fa90b8c.tar.bz2
Minor beautification. Put updates and declarations in a more logical order.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 017fcd8..22d9cb3 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -60,8 +60,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
size_t perturb = hash;
size_t mask = so->mask;
size_t i = (size_t)hash; /* Unsigned for defined overflow behavior. */
- int cmp;
size_t j;
+ int cmp;
entry = &table[i & mask];
if (entry->key == NULL)
@@ -211,9 +211,9 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash)
i = i * 5 + 1 + perturb;
}
found_null:
- so->fill++;
entry->key = key;
entry->hash = hash;
+ so->fill++;
so->used++;
}