diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-06-28 10:48:37 -0700 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2018-06-28 10:48:37 -0700 |
commit | 9d92524c11def666a78ff57a9603a9ad6142418a (patch) | |
tree | be6a6fcb868dab8b145a3b252c01ba5adb99f697 /Parser | |
parent | bpo-33985: Implement ContextVar.name attribute. (GH-7980) (diff) | |
download | cpython-9d92524c11def666a78ff57a9603a9ad6142418a.tar.gz cpython-9d92524c11def666a78ff57a9603a9ad6142418a.tar.bz2 cpython-9d92524c11def666a78ff57a9603a9ad6142418a.zip |
bpo-31546: Fix input hook integration (GH-7978)
(cherry picked from commit 9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39)
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/myreadline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c index ab6bd4e8300..2aa3bef2b0b 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -114,6 +114,9 @@ _PyOS_WindowsConsoleReadline(HANDLE hStdIn) wbuf = wbuf_local; wbuflen = sizeof(wbuf_local) / sizeof(wbuf_local[0]) - 1; while (1) { + if (PyOS_InputHook != NULL) { + (void)(PyOS_InputHook)(); + } if (!ReadConsoleW(hStdIn, &wbuf[total_read], wbuflen - total_read, &n_read, NULL)) { err = GetLastError(); goto exit; |