Commits

Anonymous committed 791a112

Correct fix by Mark Favas for the cast problems.

  • Participants
  • Parent commits f73bf49
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Modules/mmapmodule.c

 			   PyObject * args)
 {
 	char value;
-	char * where = (self->data+self->pos);
+	char * where;
 	CHECK_VALID(NULL);
-	if ((where >= (char *)0) && (where < (self->data+self->size))) {
+	if (self->pos >= 0 && self->pos < self->size) {
+	        where = self->data + self->pos;
 		value = (char) *(where);
 		self->pos += 1;
 		return Py_BuildValue("c", (char) *(where));
 	int ilow, ihigh;
 	PyObject *v;
 {
-	unsigned char *buf;
+	const char *buf;
 
 	CHECK_VALID(-1);
 	if (ilow < 0)
 	int i;
 	PyObject *v;
 {
-	unsigned char *buf;
+	const char *buf;
  
 	CHECK_VALID(-1);
 	if (i < 0 || i >= self->size) {