mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Patch #512981: Update readline input stream on sys.stdin/out change.
This commit is contained in:
parent
88afe666da
commit
566f6afe9a
5 changed files with 42 additions and 22 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#include "abstract.h"
|
||||
#endif /* PGEN */
|
||||
|
||||
extern char *PyOS_Readline(char *);
|
||||
extern char *PyOS_Readline(FILE *, FILE *, char *);
|
||||
/* Return malloc'ed string including trailing \n;
|
||||
empty malloc'ed string for EOF;
|
||||
NULL if interrupted */
|
||||
|
|
@ -671,7 +671,7 @@ tok_nextc(register struct tok_state *tok)
|
|||
return Py_CHARMASK(*tok->cur++);
|
||||
}
|
||||
if (tok->prompt != NULL) {
|
||||
char *new = PyOS_Readline(tok->prompt);
|
||||
char *new = PyOS_Readline(stdin, stdout, tok->prompt);
|
||||
if (tok->nextprompt != NULL)
|
||||
tok->prompt = tok->nextprompt;
|
||||
if (new == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue