commit | ad8fb0d47ce7709f3c6b9589c52cfd6f6467ac63 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Sep 22 20:18:03 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Sep 22 20:18:03 2007 +0000 |
tree | ceee09e4aa6fa276e6c74c158aacbda06d832abe | |
parent | aaad0d602bd84e5d1a376d31c0ab4c471e978089 [diff] [blame] |
Patch # 188 by Philip Jenvey. Make tell() mark CRLF as a newline. With unit test.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 16786f8..271f4cd 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c
@@ -718,6 +718,7 @@ int c; c = GETC(f->f_fp); if (c == '\n') { + f->f_newlinetypes |= NEWLINE_CRLF; pos++; f->f_skipnextlf = 0; } else if (c != EOF) ungetc(c, f->f_fp);