summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-09 19:01:02 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-04-09 19:01:02 (GMT)
commitca819c3c9d2651bcaeec311915a83dd176acbd13 (patch)
tree14a101ac97c95dec3c1608556b6e9b52c181ebc3 /Objects
parentc0aa9eeb90204b8a67a610180c003c182d1691aa (diff)
parentf6622c8a3e6bdf92778359417d0fa6c3e6bda909 (diff)
downloadcpython-ca819c3c9d2651bcaeec311915a83dd176acbd13.zip
cpython-ca819c3c9d2651bcaeec311915a83dd176acbd13.tar.gz
cpython-ca819c3c9d2651bcaeec311915a83dd176acbd13.tar.bz2
merge 3.1 (#14509)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytesobject.c2
-rw-r--r--Objects/unicodeobject.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 62ddf21..796e400 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -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);
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index a5ffc56..cd17789 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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);