diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-20 14:10:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 14:10:47 (GMT) |
commit | cfb986a1a239f1a00af745a53235b8473b1bd54a (patch) | |
tree | 275b131dcd4df8d0b1d3a312910d4c7f01f2c545 /Python | |
parent | 7ad6f74fcf9db1ccfeaf0986064870d8d3887300 (diff) | |
download | cpython-cfb986a1a239f1a00af745a53235b8473b1bd54a.zip cpython-cfb986a1a239f1a00af745a53235b8473b1bd54a.tar.gz cpython-cfb986a1a239f1a00af745a53235b8473b1bd54a.tar.bz2 |
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().
Diffstat (limited to 'Python')
-rw-r--r-- | Python/initconfig.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c index 62f1f67..355f986 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -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 |