diff Python/bltinmodule.c @ 39385:5009de504f92 legacy-trunk

Bug #1535165: fixed a segfault in input() and raw_input() when sys.stdin is closed.
author Georg Brandl <georg@python.org>
date Sun, 06 Aug 2006 08:23:54 +0000
parents c9202f1c56c2
children 71b0ac80a135
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sun Aug 06 07:26:21 2006 +0000
+++ b/Python/bltinmodule.c	Sun Aug 06 08:23:54 2006 +0000
@@ -1725,7 +1725,7 @@
 		if (PyFile_WriteString(" ", fout) != 0)
 			return NULL;
 	}
-	if (PyFile_Check(fin) && PyFile_Check(fout)
+	if (PyFile_AsFile(fin) && PyFile_AsFile(fout)
             && isatty(fileno(PyFile_AsFile(fin)))
             && isatty(fileno(PyFile_AsFile(fout)))) {
 		PyObject *po;