Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6590d4a commit 26203aaCopy full SHA for 26203aa
1 file changed
Python/bltinmodule.c
@@ -436,29 +436,11 @@ builtin_raw_input(self, v)
436
object *self;
437
object *v;
438
{
439
- FILE *in = sysgetfile("stdin", stdin);
440
FILE *out = sysgetfile("stdout", stdout);
441
- char *p;
442
- int err;
443
- int n = 1000;
444
flushline();
445
if (v != NULL)
446
printobject(v, out, PRINT_RAW);
447
- v = newsizedstringobject((char *)NULL, n);
448
- if (v != NULL) {
449
- if ((err = fgets_intr(getstringvalue(v), n+1, in)) != E_OK) {
450
- err_input(err);
451
- DECREF(v);
452
- return NULL;
453
- }
454
- else {
455
- n = strlen(getstringvalue(v));
456
- if (n > 0 && getstringvalue(v)[n-1] == '\n')
457
- n--;
458
- resizestring(&v, n);
459
460
461
- return v;
+ return filegetline(sysget("stdin"), -1);
462
}
463
464
static object *
0 commit comments