Change int to Py_ssize_t in several places.

Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
This commit is contained in:
Martin v. Löwis 2006-03-07 12:08:51 +00:00
parent 8eb8a829c1
commit 725507b52e
11 changed files with 57 additions and 32 deletions

View file

@ -216,7 +216,7 @@ static PyObject *
reversed_next(reversedobject *ro)
{
PyObject *item;
long index = ro->index;
Py_ssize_t index = ro->index;
if (index >= 0) {
item = PySequence_GetItem(ro->seq, index);