Index: Objects/dictobject.c =================================================================== --- Objects/dictobject.c (revision 52915) +++ Objects/dictobject.c (working copy) @@ -9,6 +9,9 @@ #include "Python.h" +//#define MANGLE_HASH(h) (h) +#define MANGLE_HASH(h) ((h) ^ 1291) + typedef PyDictEntry dictentry; typedef PyDictObject dictobject; @@ -237,7 +240,7 @@ PyObject *err_type, *err_value, *err_tb; PyObject *startkey; - i = hash & mask; + i = MANGLE_HASH(hash) & mask; ep = &ep0[i]; if (ep->me_key == NULL || ep->me_key == key) return ep; @@ -354,7 +357,7 @@ mp->ma_lookup = lookdict; return lookdict(mp, key, hash); } - i = hash & mask; + i = MANGLE_HASH(hash) & mask; ep = &ep0[i]; if (ep->me_key == NULL || ep->me_key == key) return ep; @@ -433,7 +436,7 @@ dictentry *ep0 = mp->ma_table; register dictentry *ep; - i = hash & mask; + i = MANGLE_HASH(hash) & mask; ep = &ep0[i]; for (perturb = hash; ep->me_key != NULL; perturb >>= PERTURB_SHIFT) { i = (i << 2) + i + perturb + 1;