summaryrefslogtreecommitdiffstats
path: root/Modules/sha512module.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-01-03 08:21:55 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-01-03 08:21:55 (GMT)
commitf402e922f36a1f5fb5cc8fd87022761c6ee68c20 (patch)
tree21184817f28a38565f5ee87c33fcb0d129a52429 /Modules/sha512module.c
parent6f84659e5e1dadcf12d1eb54fcd42ab6c42ac420 (diff)
downloadcpython-f402e922f36a1f5fb5cc8fd87022761c6ee68c20.zip
cpython-f402e922f36a1f5fb5cc8fd87022761c6ee68c20.tar.gz
cpython-f402e922f36a1f5fb5cc8fd87022761c6ee68c20.tar.bz2
Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
non-pydebug builds. Several extension modules now compile cleanly when assert()s are enabled in standard builds (-DDEBUG flag).
Diffstat (limited to 'Modules/sha512module.c')
-rw-r--r--Modules/sha512module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index 88f8a64..5536fd5 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -532,7 +532,9 @@ SHA512_hexdigest(SHAobject *self, PyObject *unused)
c = (digest[i] & 0xf);
hex_digest[j++] = Py_hexdigits[c];
}
+#ifdef Py_DEBUG
assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
return retval;
}