From 3165fe6a56c07f4f85f4ea54b69f5b1f243e2463 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 25 Sep 1992 21:59:05 +0000 Subject: Modified most (but not yet all) I/O to always go through sys.stdout or sys.stderr or sys.stdin, and to work with any object as long as it has a write() (respectively readline()) methods. Some functions that took a FILE* argument now take an object* argument. --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index a83ec460e95..5dff38ef793 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -62,7 +62,7 @@ sysgetfile(name, def) { FILE *fp = NULL; object *v = sysget(name); - if (v != NULL) + if (v != NULL && is_fileobject(v)) fp = getfilefile(v); if (fp == NULL) fp = def; -- cgit v1.2.3