summaryrefslogtreecommitdiffstats
path: root/Modules/sha1module.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-01-03 08:22:41 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-01-03 08:22:41 (GMT)
commit75e923fcf2da24c08d148b6a3256252d16cb8312 (patch)
tree2cc2cd91243a274be98f1b5eefd275c6ca113491 /Modules/sha1module.c
parent37623ab5f12b9034b1935f9507c3a5d1786dfd9e (diff)
parentf402e922f36a1f5fb5cc8fd87022761c6ee68c20 (diff)
downloadcpython-75e923fcf2da24c08d148b6a3256252d16cb8312.zip
cpython-75e923fcf2da24c08d148b6a3256252d16cb8312.tar.gz
cpython-75e923fcf2da24c08d148b6a3256252d16cb8312.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/sha1module.c')
-rw-r--r--Modules/sha1module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index ab93f68..52ef8a9 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -376,7 +376,9 @@ SHA1_hexdigest(SHA1object *self, PyObject *unused)
c = (digest[i] & 0xf);
hex_digest[j++] = Py_hexdigits[c];
}
+#ifdef Py_DEBUG
assert(_PyUnicode_CheckConsistency(retval, 1));
+#endif
return retval;
}