]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #18408: Don't check unicode consistency in _PyUnicode_HAS_UTF8_MEMORY()
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 15 Jul 2013 16:22:47 +0000 (18:22 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 15 Jul 2013 16:22:47 +0000 (18:22 +0200)
commite699e5a21869d8ced1726518044faae45dd22b9c
tree3a769cd6dbe3964078d798e951d0e9a10b049325
parent3de58698647221df4dc0d198bb512e7e80eec818
Issue #18408: Don't check unicode consistency in _PyUnicode_HAS_UTF8_MEMORY()
and _PyUnicode_HAS_WSTR_MEMORY() macros

These macros are called in unicode_dealloc(), whereas the unicode object can be
"inconsistent" if the creation of the object failed.

For example, when unicode_subtype_new() fails on a memory allocation,
_PyUnicode_CheckConsistency() fails with an assertion error because data is
NULL.
Objects/unicodeobject.c