gh-92536: Remove PyUnicode_READY() calls (#105210)

Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.
This commit is contained in:
Victor Stinner 2023-06-02 01:33:17 +02:00 committed by GitHub
parent cbb9ba844f
commit ef300937c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 5 additions and 186 deletions

View file

@ -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,