Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()

And PyUnicode_GetSize() => PyUnicode_GetLength()
This commit is contained in:
Victor Stinner 2011-11-21 02:49:52 +01:00
parent f3ae6208c7
commit 9e30aa52fd
10 changed files with 18 additions and 19 deletions

View file

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