Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Unified Diff: Objects/unicodeobject.c

Issue 13704: Random number generator in Python core
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Objects/unicodeobject.c Fri Dec 30 21:26:08 2011 +0100
+++ b/Objects/unicodeobject.c Tue Jan 03 21:48:43 2012 +0100
@@ -11107,7 +11107,7 @@
/* The hash function as a macro, gets expanded three times below. */
#define HASH(P) \
- x = (Py_uhash_t)*P << 7; \
+ x = Py_RndHashSeed + ((Py_uhash_t)*P << 7); \
gregory.p.smith 2012/01/15 02:18:38 Use ^ instead of +. Consistent with my suggestion
while (--len >= 0) \
x = (1000003*x) ^ (Py_uhash_t)*P++;

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+