summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-06-28 17:48:37 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2018-06-28 17:48:37 (GMT)
commit9d92524c11def666a78ff57a9603a9ad6142418a (patch)
treebe6a6fcb868dab8b145a3b252c01ba5adb99f697 /Parser
parent4c20d2bf5daaaa174260558c71052b73d73b6c34 (diff)
downloadcpython-9d92524c11def666a78ff57a9603a9ad6142418a.zip
cpython-9d92524c11def666a78ff57a9603a9ad6142418a.tar.gz
cpython-9d92524c11def666a78ff57a9603a9ad6142418a.tar.bz2
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index ab6bd4e..2aa3bef 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;