Skip to content

Commit ef34c68

Browse files
pablogsaltacaswell
authored andcommitted
Fix review comments for GH-103931
1 parent 7aedf73 commit ef34c68

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix repeated calls to :c:var:`PyOS_InputHook` for long input lines.

‎Parser/myreadline.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
312312
fprintf(stderr, "%s", prompt);
313313
}
314314
fflush(stderr);
315-
315+
// Keep this outside my_fgets(): long lines call my_fgets() repeatedly.
316316
if (PyOS_InputHook != NULL &&
317317
// GH-104668: See PyOS_ReadlineFunctionPointer's comment below...
318318
_Py_IsMainInterpreter(tstate->interp))
319319
{
320-
(void)(PyOS_InputHook)();
320+
(void)(PyOS_InputHook)();
321321
}
322322

323323
n = 0;

0 commit comments

Comments
 (0)