mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
merge 3.5 (#28184)
This commit is contained in:
commit
e2e792d98f
7 changed files with 31 additions and 31 deletions
|
|
@ -172,7 +172,7 @@ _PyOS_WindowsConsoleReadline(HANDLE hStdIn)
|
|||
buf = PyMem_RawMalloc(u8len + 1);
|
||||
u8len = WideCharToMultiByte(CP_UTF8, 0, wbuf, total_read, buf, u8len, NULL, NULL);
|
||||
buf[u8len] = '\0';
|
||||
|
||||
|
||||
exit:
|
||||
if (wbuf != wbuf_local)
|
||||
PyMem_RawFree(wbuf);
|
||||
|
|
@ -204,11 +204,11 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
|
|||
#ifdef MS_WINDOWS
|
||||
if (!Py_LegacyWindowsStdioFlag && sys_stdin == stdin) {
|
||||
HANDLE hStdIn;
|
||||
|
||||
|
||||
_Py_BEGIN_SUPPRESS_IPH
|
||||
hStdIn = (HANDLE)_get_osfhandle(fileno(sys_stdin));
|
||||
_Py_END_SUPPRESS_IPH
|
||||
|
||||
|
||||
if (_get_console_type(hStdIn) == 'r') {
|
||||
fflush(sys_stdout);
|
||||
if (prompt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue