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

Unified Diff: Objects/object.c

Issue 13704: Random number generator in Python core
Patch Set: Created 8 years, 2 months 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/object.c Fri Dec 30 21:26:08 2011 +0100
+++ b/Objects/object.c Tue Jan 03 21:48:43 2012 +0100
@@ -759,7 +759,7 @@
Py_uhash_t x;
Py_ssize_t i;
- 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 +.
for (i = 0; i < len; i++)
x = (1000003U * x) ^ (Py_uhash_t) *p++;
x ^= (Py_uhash_t) len;

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