Message195531
Here's an excerpt from the patch that gives a pretty good idea of what is being changed (the three lines of new logic are marked):
static void
set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash)
{
setentry *table = so->table;
setentry *entry;
size_t perturb = hash;
size_t mask = (size_t)so->mask;
size_t i, j; // the j variable is new
i = j = (size_t)hash & mask;
while(1) {
entry = &table[j];
if (entry->key == NULL)
break;
entry = &table[j ^ 1]; // this line is new
if (entry->key == NULL) // this line is new
break; // this line new
i = i * 5 + perturb + 1;
j = i & mask;
perturb >>= PERTURB_SHIFT;
}
so->fill++;
entry->key = key;
entry->hash = hash;
so->used++;
} |
|
Date |
User |
Action |
Args |
2013-08-17 23:08:41 | rhettinger | set | recipients:
+ rhettinger, vstinner, christian.heimes, serhiy.storchaka |
2013-08-17 23:08:40 | rhettinger | set | messageid: <1376780920.98.0.616505973936.issue18771@psf.upfronthosting.co.za> |
2013-08-17 23:08:40 | rhettinger | link | issue18771 messages |
2013-08-17 23:08:40 | rhettinger | create | |
|