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

@ -1080,7 +1080,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg)
PyObject *tzinfo = get_tzinfo_member(object);
PyObject *Zreplacement = PyUnicode_FromStringAndSize(NULL, 0);
_Py_IDENTIFIER(replace);
if (Zreplacement == NULL)
return NULL;
if (tzinfo == Py_None || tzinfo == NULL)
@ -2673,7 +2673,7 @@ date_format(PyDateTime_Date *self, PyObject *args)
return NULL;
/* if the format is zero length, return str(self) */
if (PyUnicode_GetSize(format) == 0)
if (PyUnicode_GetLength(format) == 0)
return PyObject_Str((PyObject *)self);
return _PyObject_CallMethodId((PyObject *)self, &PyId_strftime, "O", format);