mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue