Restore frozenset hash caching removed in cf707dd190a9

This commit is contained in:
Raymond Hettinger 2015-08-06 22:15:22 -07:00
parent 8e9f9852be
commit b501a27ad8

View file

@ -763,6 +763,9 @@ frozenset_hash(PyObject *self)
Py_uhash_t hash = 1927868237UL;
setentry *entry;
if (so->hash != -1)
return so->hash;
/* Initial dispersion based on the number of active entries */
hash *= (Py_uhash_t)PySet_GET_SIZE(self) + 1;