diff options
-rw-r--r-- | Objects/bytesobject.c | 2 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index db93f37..a0c121e 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -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); diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2ec878f..341114f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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); |