diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 07:13:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 07:13:07 (GMT) |
commit | 06515833fef7b8b5c7968edf72367d94ff7eb1e0 (patch) | |
tree | 58a7c06bba8141883a5e5c8621d2b0683ae9fe2e /Modules/_datetimemodule.c | |
parent | e20973926a2ec19c4b87e460dc6f0edb478ce352 (diff) | |
download | cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.zip cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.gz cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.bz2 |
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
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 5ddf650..d0ddcc2 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -1219,7 +1219,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple, assert(object && format && timetuple); assert(PyUnicode_Check(format)); /* Convert the input format to a C string and size */ - pin = _PyUnicode_AsStringAndSize(format, &flen); + pin = PyUnicode_AsUTF8AndSize(format, &flen); if (!pin) return NULL; @@ -1287,7 +1287,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple, } assert(Zreplacement != NULL); assert(PyUnicode_Check(Zreplacement)); - ptoappend = _PyUnicode_AsStringAndSize(Zreplacement, + ptoappend = PyUnicode_AsUTF8AndSize(Zreplacement, &ntoappend); if (ptoappend == NULL) goto Done; |