mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
This commit is contained in:
parent
e20973926a
commit
06515833fe
31 changed files with 62 additions and 62 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue