summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 07:13:07 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 07:13:07 (GMT)
commit06515833fef7b8b5c7968edf72367d94ff7eb1e0 (patch)
tree58a7c06bba8141883a5e5c8621d2b0683ae9fe2e /Python/bltinmodule.c
parente20973926a2ec19c4b87e460dc6f0edb478ce352 (diff)
downloadcpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.zip
cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.gz
cpython-06515833fef7b8b5c7968edf72367d94ff7eb1e0.tar.bz2
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index cee013f..a49cb9d 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1903,8 +1903,8 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
/* stdin is a text stream, so it must have an
encoding. */
goto _readline_errors;
- stdin_encoding_str = _PyUnicode_AsString(stdin_encoding);
- stdin_errors_str = _PyUnicode_AsString(stdin_errors);
+ stdin_encoding_str = PyUnicode_AsUTF8(stdin_encoding);
+ stdin_errors_str = PyUnicode_AsUTF8(stdin_errors);
if (!stdin_encoding_str || !stdin_errors_str)
goto _readline_errors;
tmp = _PyObject_CallMethodId(fout, &PyId_flush, NULL);
@@ -1920,8 +1920,8 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
stdout_errors = _PyObject_GetAttrId(fout, &PyId_errors);
if (!stdout_encoding || !stdout_errors)
goto _readline_errors;
- stdout_encoding_str = _PyUnicode_AsString(stdout_encoding);
- stdout_errors_str = _PyUnicode_AsString(stdout_errors);
+ stdout_encoding_str = PyUnicode_AsUTF8(stdout_encoding);
+ stdout_errors_str = PyUnicode_AsUTF8(stdout_errors);
if (!stdout_encoding_str || !stdout_errors_str)
goto _readline_errors;
stringpo = PyObject_Str(prompt);