mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-dev
This commit is contained in:
parent
7443b80549
commit
47f0ffa7ee
2 changed files with 2 additions and 2 deletions
|
@ -470,7 +470,7 @@ static PyObject *
|
||||||
mmap_tell_method(mmap_object *self, PyObject *unused)
|
mmap_tell_method(mmap_object *self, PyObject *unused)
|
||||||
{
|
{
|
||||||
CHECK_VALID(NULL);
|
CHECK_VALID(NULL);
|
||||||
return PyInt_FromLong((long) self->pos);
|
return PyInt_FromSsize_t(self->pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
@ -922,7 +922,7 @@ file_readinto(PyFileObject *f, PyObject *args)
|
||||||
ndone += nnow;
|
ndone += nnow;
|
||||||
ntodo -= nnow;
|
ntodo -= nnow;
|
||||||
}
|
}
|
||||||
return PyInt_FromLong((long)ndone);
|
return PyInt_FromSsize_t(ndone);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue