diff Objects/stringobject.c @ 4283:839f72610ae1 legacy-trunk

Multiply by 1000003 instead of 3 in string hach
author Guido van Rossum <guido@python.org>
date Wed, 11 Sep 1996 20:22:48 +0000
parents 36cc3ee54f28
children d8759d0b5a67
line wrap: on
line diff
--- 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;