diff options
| author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 02:49:52 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 02:49:52 +0100 |
| commit | 9e30aa52fd416e17b692c4f22e57191cdd6ec654 (patch) | |
| tree | f3b1c85f5cdbb6a32ec8f309400e8d3e1c2bbfaf /Modules/_datetimemodule.c | |
| parent | f3ae6208c706bae89d86df44c7c3dcac1bdcd94d (diff) | |
| download | cpython-git-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.gz | |
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
Diffstat (limited to 'Modules/_datetimemodule.c')
| -rw-r--r-- | Modules/_datetimemodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 316e1d72fd..b38423376a 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -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); |
