mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -207,7 +207,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt)
|
|||
*target = '\0';
|
||||
if (src != Py_None) {
|
||||
Py_ssize_t len;
|
||||
len = PyUnicode_GetSize(src);
|
||||
len = PyUnicode_GetLength(src);
|
||||
if (len > 1) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"\"%s\" must be an 1-character string",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue