diff Python/bltinmodule.c @ 23029:8291473fde3e legacy-trunk

Mass checkin of universal newline support. Highlights: import and friends will understand any of \r, \n and \r\n as end of line. Python file input will do the same if you use mode 'U'. Everything can be disabled by configuring with --without-universal-newlines. See PEP278 for details.
author Jack Jansen <jack.jansen@cwi.nl>
date Sun, 14 Apr 2002 20:12:41 +0000
parents aa8d59823add
children afe263672fd8
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sun Apr 14 10:30:51 2002 +0000
+++ b/Python/bltinmodule.c	Sun Apr 14 20:12:41 2002 +0000
@@ -594,7 +594,7 @@
 
         if (exists) {
 		Py_BEGIN_ALLOW_THREADS
-		fp = fopen(filename, "r");
+		fp = fopen(filename, "r" PY_STDIOTEXTMODE);
 		Py_END_ALLOW_THREADS
 
 		if (fp == NULL) {