mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue