diff Objects/stringobject.c @ 75133:357e268e7c5f 2.6

ensure no one tries to hash things before the random seed is found
author Benjamin Peterson <benjamin@python.org>
date Tue, 21 Feb 2012 11:08:50 -0500
parents Objects/bytesobject.c@acda43252710
children 40b684215b4f
line wrap: on
line diff
--- a/Objects/stringobject.c	Tue Feb 21 10:22:34 2012 -0500
+++ b/Objects/stringobject.c	Tue Feb 21 11:08:50 2012 -0500
@@ -1209,6 +1209,7 @@
     register unsigned char *p;
     register long x;
 
+    assert(_Py_HashSecret_Initialized);
     if (a->ob_shash != -1)
         return a->ob_shash;
     len = Py_SIZE(a);