From 06515833fef7b8b5c7968edf72367d94ff7eb1e0 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 20 Nov 2016 09:13:07 +0200 Subject: Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize. --- Python/sysmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index e348b3873e7..52034ff7fb5 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; @@ -2411,7 +2411,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); } -- cgit v1.2.3