ensure no one tries to hash things before the random seed is found

This commit is contained in:
Benjamin Peterson 2012-02-21 11:08:50 -05:00
parent b69fa1f8b7
commit 26da920001
4 changed files with 14 additions and 4 deletions

View file

@ -6692,6 +6692,7 @@ unicode_hash(PyUnicodeObject *self)
register Py_UNICODE *p;
register long x;
assert(_Py_HashSecret_Initialized);
if (self->hash != -1)
return self->hash;
len = PyUnicode_GET_SIZE(self);