mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-93937: PyOS_StdioReadline() uses PyConfig.legacy_windows_stdio (#94024)
On Windows, PyOS_StdioReadline() now gets PyConfig.legacy_windows_stdio from _PyOS_ReadlineTState, rather than using the deprecated global Py_LegacyWindowsStdioFlag variable. Fix also a compiler warning in Py_SetStandardStreamEncoding().
This commit is contained in:
parent
7ad6f74fcf
commit
cfb986a1a2
2 changed files with 5 additions and 1 deletions
|
@ -543,8 +543,11 @@ Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
|
|||
}
|
||||
#ifdef MS_WINDOWS
|
||||
if (_Py_StandardStreamEncoding) {
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
/* Overriding the stream encoding implies legacy streams */
|
||||
Py_LegacyWindowsStdioFlag = 1;
|
||||
_Py_COMP_DIAG_POP
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue