diff Objects/bytesobject.c @ 75127:160a56eac332 3.1

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 f4b7ecf8a5f8
children eb07691f2c29
line wrap: on
line diff
--- a/Objects/bytesobject.c	Mon Feb 20 22:06:02 2012 +0100
+++ b/Objects/bytesobject.c	Tue Feb 21 11:08:50 2012 -0500
@@ -896,6 +896,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);