summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-09 18:53:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-04-09 18:53:07 (GMT)
commitf51c384a0af9cc233b52ea98313e312dcb414dce (patch)
treeaab1363570407b34cca1ffc47bcbacba08145393 /Objects
parenteee769031570064e073f1b05762521883c2a0f5d (diff)
downloadcpython-f51c384a0af9cc233b52ea98313e312dcb414dce.zip
cpython-f51c384a0af9cc233b52ea98313e312dcb414dce.tar.gz
cpython-f51c384a0af9cc233b52ea98313e312dcb414dce.tar.bz2
fix build without Py_DEBUG and DNDEBUG (closes #14509)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringobject.c2
-rw-r--r--Objects/unicodeobject.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 9826792..ab377dd 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -1262,7 +1262,9 @@ string_hash(PyStringObject *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 4fb1aed..710bcf3 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -6538,7 +6538,9 @@ unicode_hash(PyUnicodeObject *self)
register Py_UNICODE *p;
register long x;
+#ifdef Py_DEBUG
assert(_Py_HashSecret_Initialized);
+#endif
if (self->hash != -1)
return self->hash;
len = PyUnicode_GET_SIZE(self);