mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
This commit is contained in:
parent
f3ae6208c7
commit
9e30aa52fd
10 changed files with 18 additions and 19 deletions
|
@ -4784,7 +4784,7 @@ _PyUnicode_AsUTF8String(PyObject *unicode, const char *errors)
|
|||
if (PyBytes_Check(rep))
|
||||
repsize = PyBytes_GET_SIZE(rep);
|
||||
else
|
||||
repsize = PyUnicode_GET_SIZE(rep);
|
||||
repsize = PyUnicode_GET_LENGTH(rep);
|
||||
|
||||
if (repsize > 4) {
|
||||
Py_ssize_t offset;
|
||||
|
@ -8187,7 +8187,7 @@ charmap_encoding_error(
|
|||
Py_DECREF(repunicode);
|
||||
return -1;
|
||||
}
|
||||
repsize = PyUnicode_GET_SIZE(repunicode);
|
||||
repsize = PyUnicode_GET_LENGTH(repunicode);
|
||||
data = PyUnicode_DATA(repunicode);
|
||||
kind = PyUnicode_KIND(repunicode);
|
||||
for (index = 0; index < repsize; index++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue