mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead
This commit is contained in:
parent
ed2682be2f
commit
c4f281eba3
6 changed files with 10 additions and 12 deletions
|
@ -2719,7 +2719,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
|
|||
PyErr_Format(PyExc_TypeError,
|
||||
"expect bytes or str of length 1, or int, "
|
||||
"got a str of length %zi",
|
||||
PyUnicode_GET_SIZE(obj));
|
||||
PyUnicode_GET_LENGTH(obj));
|
||||
return 0;
|
||||
}
|
||||
*wch = buffer[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue