From b44c5169f64178d2ff2914187b315549e7ab0cb6 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 16 Jan 2018 01:30:26 -0800 Subject: bpo-26163: Frozenset hash improvement (#5194) --- Objects/setobject.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Objects/setobject.c') diff --git a/Objects/setobject.c b/Objects/setobject.c index c920fb9853..4bc1020d56 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -795,6 +795,7 @@ frozenset_hash(PyObject *self) hash ^= ((Py_uhash_t)PySet_GET_SIZE(self) + 1) * 1927868237UL; /* Disperse patterns arising in nested frozensets */ + hash ^= (hash >> 11) ^ (~hash >> 25); hash = hash * 69069U + 907133923UL; /* -1 is reserved as an error code */ -- cgit v1.2.1