diff options
author | Guido van Rossum <guido@python.org> | 2007-09-22 20:18:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-09-22 20:18:03 (GMT) |
commit | ad8fb0d47ce7709f3c6b9589c52cfd6f6467ac63 (patch) | |
tree | ceee09e4aa6fa276e6c74c158aacbda06d832abe /Objects/fileobject.c | |
parent | aaad0d602bd84e5d1a376d31c0ab4c471e978089 (diff) | |
download | cpython-ad8fb0d47ce7709f3c6b9589c52cfd6f6467ac63.zip cpython-ad8fb0d47ce7709f3c6b9589c52cfd6f6467ac63.tar.gz cpython-ad8fb0d47ce7709f3c6b9589c52cfd6f6467ac63.tar.bz2 |
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 @@ file_tell(PyFileObject *f) 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); |