summaryrefslogtreecommitdiff
path: root/Python/sysmodule.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
commitabbf5f179143f0c4e96fe5e507ea5f69ea195c9e (patch)
treeae85c044408fb7c39d5650f2c14852ff143bb09b /Python/sysmodule.c
parent3ae4d6f125f8827d2a3cf1add462dced61a2359c (diff)
parent57c0f2e61c8a5893c37e576a3a03ba5e57c1132c (diff)
downloadcpython-abbf5f179143f0c4e96fe5e507ea5f69ea195c9e.tar.gz
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 9247d4ed69..28561ace3b 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -114,7 +114,7 @@ sys_displayhook_unencodable(PyObject *outf, PyObject *o)
stdout_encoding = _PyObject_GetAttrId(outf, &PyId_encoding);
if (stdout_encoding == NULL)
goto error;
- stdout_encoding_str = _PyUnicode_AsString(stdout_encoding);
+ stdout_encoding_str = PyUnicode_AsUTF8(stdout_encoding);
if (stdout_encoding_str == NULL)
goto error;
@@ -2412,7 +2412,7 @@ sys_format(_Py_Identifier *key, FILE *fp, const char *format, va_list va)
if (message != NULL) {
if (sys_pyfile_write_unicode(message, file) != 0) {
PyErr_Clear();
- utf8 = _PyUnicode_AsString(message);
+ utf8 = PyUnicode_AsUTF8(message);
if (utf8 != NULL)
fputs(utf8, fp);
}