From 076d1e0c0b1858a9086c63c237cbe13691231b0f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 21 Aug 2006 18:20:10 +0000 Subject: Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-dev --- Modules/mmapmodule.c | 2 +- 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); } /************************************************************************** -- cgit v0.12