[Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.6,2.7

Guido van Rossum python-dev@python.org
Mon, 10 Apr 2000 17:34:40 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/src/Modules

Modified Files:
	mmapmodule.c 
Log Message:
Correct fix by Mark Favas for the cast problems.


Index: mmapmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -r2.6 -r2.7
*** mmapmodule.c	2000/04/10 21:14:05	2.6
--- mmapmodule.c	2000/04/10 21:34:37	2.7
***************
*** 2,6 ****
   /  Author: Sam Rushing <rushing@nightmare.com>
   /  Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com> 
!  /  $Id: mmapmodule.c,v 2.6 2000/04/10 21:14:05 guido Exp $
  
   / mmapmodule.cpp -- map a view of a file into memory
--- 2,6 ----
   /  Author: Sam Rushing <rushing@nightmare.com>
   /  Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com> 
!  /  $Id: mmapmodule.c,v 2.7 2000/04/10 21:34:37 guido Exp $
  
   / mmapmodule.cpp -- map a view of a file into memory
***************
*** 117,123 ****
  {
  	char value;
! 	char * where = (self->data+self->pos);
  	CHECK_VALID(NULL);
! 	if ((where >= (char *)0) && (where < (self->data+self->size))) {
  		value = (char) *(where);
  		self->pos += 1;
--- 117,124 ----
  {
  	char value;
! 	char * where;
  	CHECK_VALID(NULL);
! 	if (self->pos >= 0 && self->pos < self->size) {
! 	        where = self->data + self->pos;
  		value = (char) *(where);
  		self->pos += 1;
***************
*** 594,598 ****
  	PyObject *v;
  {
! 	unsigned char *buf;
  
  	CHECK_VALID(-1);
--- 595,599 ----
  	PyObject *v;
  {
! 	const char *buf;
  
  	CHECK_VALID(-1);
***************
*** 629,633 ****
  	PyObject *v;
  {
! 	unsigned char *buf;
   
  	CHECK_VALID(-1);
--- 630,634 ----
  	PyObject *v;
  {
! 	const char *buf;
   
  	CHECK_VALID(-1);