summaryrefslogtreecommitdiff
path: root/Modules/_datetimemodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 09:13:40 +0200
commita98c4a984b34f887076f4171b1e3303e164cbddf (patch)
tree78f6f0fbbc6728e24d5478aadb7bfe1d871b244f /Modules/_datetimemodule.c
parentf6f15918087f2fae652634303a79f9cc6bc421ce (diff)
parent06515833fef7b8b5c7968edf72367d94ff7eb1e0 (diff)
downloadcpython-git-a98c4a984b34f887076f4171b1e3303e164cbddf.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index cced71cd9c..6597fdaa71 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;