diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-10-29 09:46:04 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-10-29 09:46:04 +0000 |
commit | 3ddb52717f19d1fab12911531b6aa0db5b701f56 (patch) | |
tree | 64b7871212a4f37d70ffc239cfbab3feb99ca272 /Modules/_io/bufferedio.c | |
parent | 8c06ccc058e1fb5d120da8e0b8ce5fc3a5abb6b6 (diff) | |
download | cpython-git-3ddb52717f19d1fab12911531b6aa0db5b701f56.tar.gz |
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.
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r-- | Modules/_io/bufferedio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index ef17faf2d6..040f3bf9e7 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -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; |