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

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/

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.
Sigh. You're right. I've seen two patches to mmapmodule.c since he posted that patch, and no comments on his patch, so I thought his patch was already incorporated. I was wrong. Note that this module still gives 6 warnings on VC6.0, all C4018: '>' or '>=' signed/unsigned mismatch. I wish someone gave me a patch for that too. Unrelated: _sre.c also has a bunch of VC6 warnings -- all C4761, integral size mismatch in argument: conversion supplied. This is all about the calls to SRE_IS_DIGIT and SRE_IS_SPACE. The error occurs 8 times on 4 different lines, and is reported in a cyclic fashion: 106, 108, 110, 112, 106, 108, ..., etc., probably due to sre's recursive self-include tricks? --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Greg Stein
-
Guido van Rossum