mirror of
https://github.com/python/cpython.git
synced 2025-09-23 00:43:12 +00:00
fix build without Py_DEBUG and DNDEBUG (closes #14509)
This commit is contained in:
parent
eee7690315
commit
f51c384a0a
2 changed files with 4 additions and 0 deletions
|
@ -1262,7 +1262,9 @@ string_hash(PyStringObject *a)
|
||||||
register unsigned char *p;
|
register unsigned char *p;
|
||||||
register long x;
|
register long x;
|
||||||
|
|
||||||
|
#ifdef Py_DEBUG
|
||||||
assert(_Py_HashSecret_Initialized);
|
assert(_Py_HashSecret_Initialized);
|
||||||
|
#endif
|
||||||
if (a->ob_shash != -1)
|
if (a->ob_shash != -1)
|
||||||
return a->ob_shash;
|
return a->ob_shash;
|
||||||
len = Py_SIZE(a);
|
len = Py_SIZE(a);
|
||||||
|
|
|
@ -6538,7 +6538,9 @@ unicode_hash(PyUnicodeObject *self)
|
||||||
register Py_UNICODE *p;
|
register Py_UNICODE *p;
|
||||||
register long x;
|
register long x;
|
||||||
|
|
||||||
|
#ifdef Py_DEBUG
|
||||||
assert(_Py_HashSecret_Initialized);
|
assert(_Py_HashSecret_Initialized);
|
||||||
|
#endif
|
||||||
if (self->hash != -1)
|
if (self->hash != -1)
|
||||||
return self->hash;
|
return self->hash;
|
||||||
len = PyUnicode_GET_SIZE(self);
|
len = PyUnicode_GET_SIZE(self);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue