mirror of https://github.com/python/cpython
fix build without Py_DEBUG and DNDEBUG (closes #14509)
This commit is contained in:
parent
7fddb4b2f6
commit
f6622c8a3e
|
@ -896,7 +896,9 @@ bytes_hash(PyBytesObject *a)
|
|||
register unsigned char *p;
|
||||
register long x;
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
assert(_Py_HashSecret_Initialized);
|
||||
#endif
|
||||
if (a->ob_shash != -1)
|
||||
return a->ob_shash;
|
||||
len = Py_SIZE(a);
|
||||
|
|
|
@ -7341,7 +7341,9 @@ unicode_hash(PyUnicodeObject *self)
|
|||
Py_UNICODE *p;
|
||||
long x;
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
assert(_Py_HashSecret_Initialized);
|
||||
#endif
|
||||
if (self->hash != -1)
|
||||
return self->hash;
|
||||
len = Py_SIZE(self);
|
||||
|
|
Loading…
Reference in New Issue