aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-01-03 09:22:41 +0100
committerChristian Heimes <christian@cheimes.de>2013-01-03 09:22:41 +0100
commit75e923fcf2da24c08d148b6a3256252d16cb8312 (patch)
tree2cc2cd91243a274be98f1b5eefd275c6ca113491 /Modules/_sha3
parent#16009: JSON error messages now provide more information. Patch by Serhiy St... (diff)
parentIssue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in (diff)
downloadcpython-75e923fcf2da24c08d148b6a3256252d16cb8312.tar.gz
cpython-75e923fcf2da24c08d148b6a3256252d16cb8312.tar.bz2
cpython-75e923fcf2da24c08d148b6a3256252d16cb8312.zip
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/_sha3')
-rw-r--r--Modules/_sha3/sha3module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c
index 4c3c6db1322..32cd85a1efa 100644
--- a/Modules/_sha3/sha3module.c
+++ b/Modules/_sha3/sha3module.c
@@ -300,7 +300,9 @@ SHA3_hexdigest(SHA3object *self, PyObject *unused)
c = (digest[i] & 0xf);
hex_digest[j++] = Py_hexdigits[c];
}
+#ifdef Py_DEBUG
assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
return retval;
}