diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 18:20:10 (GMT) |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 18:20:10 (GMT) |
| commit | 076d1e0c0b1858a9086c63c237cbe13691231b0f (patch) | |
| tree | 72925912b97695b66abc9e57ff048465697cf812 | |
| parent | 87557cd72a75ee3d7e8c6a53ee01bab0bc6ec73a (diff) | |
| download | cpython-076d1e0c0b1858a9086c63c237cbe13691231b0f.zip cpython-076d1e0c0b1858a9086c63c237cbe13691231b0f.tar.gz cpython-076d1e0c0b1858a9086c63c237cbe13691231b0f.tar.bz2 | |
Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-dev
| -rw-r--r-- | Modules/mmapmodule.c | 2 | ||||
| -rw-r--r-- | Objects/fileobject.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 73871ac..b8dd02d 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -470,7 +470,7 @@ static PyObject * mmap_tell_method(mmap_object *self, PyObject *unused) { CHECK_VALID(NULL); - return PyInt_FromLong((long) self->pos); + return PyInt_FromSsize_t(self->pos); } static PyObject * diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 71ba01b..5249f1c 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -922,7 +922,7 @@ file_readinto(PyFileObject *f, PyObject *args) ndone += nnow; ntodo -= nnow; } - return PyInt_FromLong((long)ndone); + return PyInt_FromSsize_t(ndone); } /************************************************************************** |
