Author rhettinger
Recipients christian.heimes, rhettinger, serhiy.storchaka, vstinner
Date 2013-08-17.23:07:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376780828.1.0.317249472154.issue18771@psf.upfronthosting.co.za>
In-reply-to
Content
Here's an excerpt of the patch that gives a pretty good idea of that is being changed (there are essentially three lines of new logic):

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++;
}
History
Date User Action Args
2013-08-17 23:07:43rhettingerunlinkissue18771 messages
2013-08-17 23:07:08rhettingersetrecipients: + rhettinger, vstinner, christian.heimes, serhiy.storchaka
2013-08-17 23:07:08rhettingersetmessageid: <1376780828.1.0.317249472154.issue18771@psf.upfronthosting.co.za>
2013-08-17 23:07:08rhettingerlinkissue18771 messages
2013-08-17 23:07:08rhettingercreate