commit | d731579bfb9a497cfb0076cb6b221058a20088fe | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Fri Oct 20 17:59:29 2023 +0200 |
committer | GitHub <noreply@github.com> | Fri Oct 20 17:59:29 2023 +0200 |
tree | 63eb8f9b8dfb7af9a5de6d4499ab375b80f208d4 | |
parent | 59ea0f523e155ac1a471cd292b41a76241fccd36 [diff] |
gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091) * PyUnicode_AsUTF8() now raises an exception if the string contains embedded null characters. * Update related C API tests (test_capi.test_unicode). * type_new_set_doc() uses PyUnicode_AsUTF8AndSize() to silently truncate doc containing null bytes. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>