mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-92536: Remove PyUnicode_READY() calls (#105210)
Since Python 3.12, PyUnicode_READY() does nothing and always returns 0.
This commit is contained in:
parent
cbb9ba844f
commit
ef300937c2
32 changed files with 5 additions and 186 deletions
|
@ -1717,9 +1717,6 @@ idna_converter(PyObject *obj, struct maybe_idna *data)
|
|||
len = PyByteArray_Size(obj);
|
||||
}
|
||||
else if (PyUnicode_Check(obj)) {
|
||||
if (PyUnicode_READY(obj) == -1) {
|
||||
return 0;
|
||||
}
|
||||
if (PyUnicode_IS_COMPACT_ASCII(obj)) {
|
||||
data->buf = PyUnicode_DATA(obj);
|
||||
len = PyUnicode_GET_LENGTH(obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue