diff options
author | Thomas A Caswell <tcaswell@gmail.com> | 2018-06-28 16:29:44 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2018-06-28 16:29:44 (GMT) |
commit | 9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39 (patch) | |
tree | 6a27c8270b49abf4552c5757b6c8627752a9a72e /Parser/myreadline.c | |
parent | 4d26c8a177d8ada440b3cfdfb1d0423ab5ca81a7 (diff) | |
download | cpython-9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39.zip cpython-9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39.tar.gz cpython-9b9d58f0d88b338eb8d2ae0da5cd91d60d1b0e39.tar.bz2 |
bpo-31546: Fix input hook integration (GH-7978)
Diffstat (limited to 'Parser/myreadline.c')
-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 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; |