commit | 0969ad213d73a052e66ebf83cb4eae48a0dd7b55 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Dec 16 17:55:46 1996 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Dec 16 17:55:46 1996 +0000 |
tree | 10d12fda01837c5c11b081f578ab5a2f0f52ca79 | |
parent | cc15b42e5919548e8d7008776f4c87f2267a00b3 [diff] |
Better tuple hash function.
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index fe3da55..fd53c30 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c
@@ -233,7 +233,7 @@ y = hashobject(*p++); if (y == -1) return -1; - x = (x + x + x) ^ y; + x = (1000003*x) ^ y; } x ^= v->ob_size; if (x == -1)