Index: Modules/mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.15 diff -c -r2.15 mmapmodule.c *** Modules/mmapmodule.c 2000/06/18 19:06:49 2.15 --- Modules/mmapmodule.c 2000/06/23 02:33:34 *************** *** 568,574 **** int i; { CHECK_VALID(NULL); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; } --- 568,574 ---- int i; { CHECK_VALID(NULL); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return NULL; } *************** *** 583,595 **** CHECK_VALID(NULL); if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; return PyString_FromStringAndSize(self->data + ilow, ihigh-ilow); --- 583,595 ---- CHECK_VALID(NULL); if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; return PyString_FromStringAndSize(self->data + ilow, ihigh-ilow); *************** *** 628,640 **** CHECK_VALID(-1); if (ilow < 0) ilow = 0; ! else if (ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; ! else if (ihigh > self->size) ihigh = self->size; if (! (PyString_Check(v)) ) { --- 628,640 ---- CHECK_VALID(-1); if (ilow < 0) ilow = 0; ! else if ((size_t)ilow > self->size) ilow = self->size; if (ihigh < 0) ihigh = 0; if (ihigh < ilow) ihigh = ilow; ! else if ((size_t)ihigh > self->size) ihigh = self->size; if (! (PyString_Check(v)) ) { *************** *** 661,667 **** const char *buf; CHECK_VALID(-1); ! if (i < 0 || i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; } --- 661,667 ---- const char *buf; CHECK_VALID(-1); ! if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index out of range"); return -1; }