(original) (raw)

changeset: 4283:839f72610ae1 branch: legacy-trunk user: Guido van Rossum guido@python.org date: Wed Sep 11 20:22:48 1996 +0000 files: Objects/stringobject.c description: Multiply by 1000003 instead of 3 in string hach diff -r daf12f64d5aa -r 839f72610ae1 Objects/stringobject.c --- a/Objects/stringobject.c Wed Sep 11 20:21:41 1996 +0000 +++ b/Objects/stringobject.c Wed Sep 11 20:22:48 1996 +0000 @@ -419,7 +419,7 @@ p = (unsigned char *) a->ob_sval; x = *p << 7; while (--len >= 0) - x = (3*x) ^ *p++; + x = (1000003*x) ^ *p++; x ^= a->ob_size; if (x == -1) x = -2; /guido@python.org