Commit ca819c3c authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.1 (#14509)

parents c0aa9eeb f6622c8a
......@@ -875,7 +875,9 @@ bytes_hash(PyBytesObject *a)
register unsigned char *p;
register Py_hash_t x;
#ifdef Py_DEBUG
assert(_Py_HashSecret_Initialized);
#endif
if (a->ob_shash != -1)
return a->ob_shash;
len = Py_SIZE(a);
......
......@@ -7673,7 +7673,9 @@ unicode_hash(PyUnicodeObject *self)
Py_UNICODE *p;
Py_hash_t x;
#ifdef Py_DEBUG
assert(_Py_HashSecret_Initialized);
#endif
if (self->hash != -1)
return self->hash;
len = Py_SIZE(self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment