Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64ed576

Browse files
committed
merge 3.2 (#14509)
2 parents 0c0914e + ca819c3 commit 64ed576

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Objects/object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,9 @@ _Py_HashBytes(unsigned char *p, Py_ssize_t len)
763763
We make the hash of the empty string be 0, rather than using
764764
(prefix ^ suffix), since this slightly obfuscates the hash secret
765765
*/
766+
#ifdef Py_DEBUG
766767
assert(_Py_HashSecret_Initialized);
768+
#endif
767769
if (len == 0) {
768770
return 0;
769771
}

Objects/unicodeobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11335,7 +11335,9 @@ unicode_hash(PyObject *self)
1133511335
Py_ssize_t len;
1133611336
Py_uhash_t x;
1133711337

11338+
#ifdef Py_DEBUG
1133811339
assert(_Py_HashSecret_Initialized);
11340+
#endif
1133911341
if (_PyUnicode_HASH(self) != -1)
1134011342
return _PyUnicode_HASH(self);
1134111343
if (PyUnicode_READY(self) == -1)

0 commit comments

Comments
 (0)