Merged revisions 75939 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75939 | mark.dickinson | 2009-10-29 09:46:04 +0000 (Thu, 29 Oct 2009) | 5 lines

  Roll back ill-considered attempts to fix printf specifier mismatch for off_t.
  The sensible solution seems to be to implement %lld for PyString_FromFormat(V)
  and PyErr_Format.  See issue #7228.
........
This commit is contained in:
Mark Dickinson 2009-10-29 09:58:06 +00:00
parent 1440df2fcf
commit cb9285cd37
2 changed files with 9 additions and 26 deletions

View file

@ -580,8 +580,7 @@ _buffered_raw_tell(buffered *self)
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
"Raw stream returned invalid position %" PY_PRIdOFF,
(PY_OFF_T_COMPAT)n);
"Raw stream returned invalid position %zd", n);
return -1;
}
self->abs_pos = n;
@ -613,8 +612,7 @@ _buffered_raw_seek(buffered *self, Py_off_t target, int whence)
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
"Raw stream returned invalid position %" PY_PRIdOFF,
(PY_OFF_T_COMPAT)n);
"Raw stream returned invalid position %zd", n);
return -1;
}
self->abs_pos = n;