[Python-checkins] CVS: python/dist/src/Modules mmapmodule.c,2.5,2.6
Guido van Rossum
python-dev@python.org
2000年4月10日 17:14:08 -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:
I've had complaints about the comparison "where >= 0" before -- on
IRIX, it doesn't even compile. Added a cast: "where >= (char *)0".
Index: mmapmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** mmapmodule.c 2000年04月05日 14:15:31 2.5
--- mmapmodule.c 2000年04月10日 21:14:05 2.6
***************
*** 2,6 ****
/ Author: Sam Rushing <rushing@nightmare.com>
/ Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com>
! / $Id: mmapmodule.c,v 2.5 2000年04月05日 14:15:31 fdrake 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.6 2000年04月10日 21:14:05 guido Exp $
/ mmapmodule.cpp -- map a view of a file into memory
***************
*** 119,123 ****
char * where = (self->data+self->pos);
CHECK_VALID(NULL);
! if ((where >= 0) && (where < (self->data+self->size))) {
value = (char) *(where);
self->pos += 1;
--- 119,123 ----
char * where = (self->data+self->pos);
CHECK_VALID(NULL);
! if ((where >= (char *)0) && (where < (self->data+self->size))) {
value = (char) *(where);
self->pos += 1;