diff options
author | 2012-04-27 13:55:39 +0200 | |
---|---|---|
committer | 2012-04-27 13:55:39 +0200 | |
commit | 8f825060f1c168b913f2ac299ca48d4e9375f34d (patch) | |
tree | 8f8a2fe0d64cd2fdf98fdb762ff1def490473bde /Modules/sha1module.c | |
parent | Backing out 86dc014cdd74. Not ready yet (diff) | |
download | cpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.tar.gz cpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.tar.bz2 cpython-8f825060f1c168b913f2ac299ca48d4e9375f34d.zip |
Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)
* In debug mode, fill the string data with invalid characters
* Simplify also reference counting in PyCodec_BackslashReplaceErrors()
and PyCodec_XMLCharRefReplaceError()
Diffstat (limited to 'Modules/sha1module.c')
-rw-r--r-- | Modules/sha1module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/sha1module.c b/Modules/sha1module.c index 30e5c5018a3..daea8879600 100644 --- a/Modules/sha1module.c +++ b/Modules/sha1module.c @@ -373,6 +373,7 @@ SHA1_hexdigest(SHA1object *self, PyObject *unused) c = (digest[i] & 0xf); hex_digest[j++] = Py_hexdigits[c]; } + assert(_PyUnicode_CheckConsistency(retval, 1)); return retval; } |