Commit 35f63a86 authored by Skip Montanaro's avatar Skip Montanaro

Change PyOS_Readline declaration to match the recent change to myreadline.c

(see Patch 512981).  I changed stdin to sys_stdin in the body of the
function, but did not change stderr to sys_stdout, though I suspect that may
be the correct course.  I don't know the code involved well enough to judge.
parent 8c140286
...@@ -165,7 +165,7 @@ guesstabsize(char *path) ...@@ -165,7 +165,7 @@ guesstabsize(char *path)
/* No-nonsense my_readline() for tokenizer.c */ /* No-nonsense my_readline() for tokenizer.c */
char * char *
PyOS_Readline(char *prompt) PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
{ {
size_t n = 1000; size_t n = 1000;
char *p = PyMem_MALLOC(n); char *p = PyMem_MALLOC(n);
...@@ -173,7 +173,7 @@ PyOS_Readline(char *prompt) ...@@ -173,7 +173,7 @@ PyOS_Readline(char *prompt)
if (p == NULL) if (p == NULL)
return NULL; return NULL;
fprintf(stderr, "%s", prompt); fprintf(stderr, "%s", prompt);
q = fgets(p, n, stdin); q = fgets(p, n, sys_stdin);
if (q == NULL) { if (q == NULL) {
*p = '\0'; *p = '\0';
return p; return p;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment