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

Greg Stein gstein@lyra.org
Mon, 10 Apr 2000 14:34:07 -0700 (PDT)


Euh... this is the incorrect fix. The 0 is wrong to begin with.

Mark Favas submitted a proper patch for this. See his "Revised Patches for
bug report 258" posted to patches@python.org on April 4th.

Cheers,
-g

On Mon, 10 Apr 2000, Guido van Rossum wrote:
> 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;
> 
> 
> _______________________________________________
> Python-checkins mailing list
> Python-checkins@python.org
> http://www.python.org/mailman/listinfo/python-checkins
> 

-- 
Greg Stein, http://www.lyra.org/