Mercurial > cpython-lru_cache-weakref
diff Modules/_io/stringio.c @ 58629:311db7a68a82
Merged revisions 77890 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77890 | antoine.pitrou | 2010-01-31 23:26:04 +0100 (dim., 31 janv. 2010) | 7 lines
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
file position when calling `truncate()`. It would previously change the
file position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
........
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 31 Jan 2010 22:47:27 +0000 |
| parents | b354c1b6b476 |
| children | 55db60fcab54 |
line wrap: on
line diff
--- a/Modules/_io/stringio.c Sun Jan 31 22:34:52 2010 +0000 +++ b/Modules/_io/stringio.c Sun Jan 31 22:47:27 2010 +0000 @@ -350,7 +350,7 @@ "Truncate size to pos.\n" "\n" "The pos argument defaults to the current file position, as\n" - "returned by tell(). Imply an absolute seek to pos.\n" + "returned by tell(). The current file position is unchanged.\n" "Returns the new absolute position.\n"); static PyObject * @@ -390,7 +390,6 @@ return NULL; self->string_size = size; } - self->pos = size; return PyLong_FromSsize_t(size); }
