diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 09:13:07 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-20 09:13:07 +0200 |
commit | 57c0f2e61c8a5893c37e576a3a03ba5e57c1132c (patch) | |
tree | 4ae45e80ff909099311fac3f431486e9dd5ade62 /Python/pythonrun.c | |
parent | f16ff20fd73de317a70840fc339f8083c45ea466 (diff) | |
download | cpython-57c0f2e61c8a5893c37e576a3a03ba5e57c1132c.tar.gz |
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5b1b78672b..c881f901ab 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -171,7 +171,7 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) if (v && v != Py_None) { oenc = _PyObject_GetAttrId(v, &PyId_encoding); if (oenc) - enc = _PyUnicode_AsString(oenc); + enc = PyUnicode_AsUTF8(oenc); if (!enc) PyErr_Clear(); } @@ -182,7 +182,7 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) if (v == NULL) PyErr_Clear(); else if (PyUnicode_Check(v)) { - ps1 = _PyUnicode_AsString(v); + ps1 = PyUnicode_AsUTF8(v); if (ps1 == NULL) { PyErr_Clear(); ps1 = ""; @@ -195,7 +195,7 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) if (w == NULL) PyErr_Clear(); else if (PyUnicode_Check(w)) { - ps2 = _PyUnicode_AsString(w); + ps2 = PyUnicode_AsUTF8(w); if (ps2 == NULL) { PyErr_Clear(); ps2 = ""; @@ -514,7 +514,7 @@ print_error_text(PyObject *f, int offset, PyObject *text_obj) char *text; char *nl; - text = _PyUnicode_AsString(text_obj); + text = PyUnicode_AsUTF8(text_obj); if (text == NULL) return; |