diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-02 01:33:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 01:33:17 +0200 |
commit | ef300937c2a1b3ebe19c2835f3b46585825c1e1f (patch) | |
tree | 34f151a390fb946ff985ed98e6c1bd096c4d090b /Objects/stringlib/codecs.h | |
parent | cbb9ba844f15f2b8127028e6dfd4681b2cb2376f (diff) | |
download | cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.tar.gz cpython-ef300937c2a1b3ebe19c2835f3b46585825c1e1f.zip |
gh-92536: Remove PyUnicode_READY() calls (#105210)
Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.
Diffstat (limited to 'Objects/stringlib/codecs.h')
-rw-r--r-- | Objects/stringlib/codecs.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h index 958cc861478..f98e71c3fc6 100644 --- a/Objects/stringlib/codecs.h +++ b/Objects/stringlib/codecs.h @@ -408,9 +408,6 @@ STRINGLIB(utf8_encoder)(_PyBytesWriter *writer, } else { /* rep is unicode */ - if (PyUnicode_READY(rep) < 0) - goto error; - if (!PyUnicode_IS_ASCII(rep)) { raise_encode_exception(&exc, "utf-8", unicode, startpos, endpos, |