summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-06-28 10:48:37 -0700
committerSteve Dower <steve.dower@microsoft.com>2018-06-28 10:48:37 -0700
commit9d92524c11def666a78ff57a9603a9ad6142418a (patch)
treebe6a6fcb868dab8b145a3b252c01ba5adb99f697 /Parser
parent4c20d2bf5daaaa174260558c71052b73d73b6c34 (diff)
downloadcpython-git-9d92524c11def666a78ff57a9603a9ad6142418a.tar.gz
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 ab6bd4e830..2aa3bef2b0 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;