diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 18:44:09 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-21 18:44:09 +0000 |
commit | 47f0ffa7ee22a58802e206780a563997df1cc326 (patch) | |
tree | 6dbee68262ef40f62418d7214cbc64ff8eaff819 | |
parent | 7443b80549ad7d74c22d94e953ebe89137037f08 (diff) | |
download | cpython-git-47f0ffa7ee22a58802e206780a563997df1cc326.tar.gz |
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 73871ac96c..b8dd02d687 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 71ba01b3ec..5249f1cdc0 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); } /************************************************************************** |