]> granicus.if.org Git - python/commitdiff
I've had complaints about the comparison "where >= 0" before -- on
authorGuido van Rossum <guido@python.org>
Mon, 10 Apr 2000 21:14:05 +0000 (21:14 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Apr 2000 21:14:05 +0000 (21:14 +0000)
IRIX, it doesn't even compile.  Added a cast: "where >= (char *)0".

Modules/mmapmodule.c

index 9f814083e23bf8daed754cb497579ecc35afb39f..3fe1f1ca20425884336e34eb1f7070a203aa47d3 100644 (file)
@@ -118,7 +118,7 @@ mmap_read_byte_method (mmap_object * self,
        char value;
        char * where = (self->data+self->pos);
        CHECK_VALID(NULL);
-       if ((where >= 0) && (where < (self->data+self->size))) {
+       if ((where >= (char *)0) && (where < (self->data+self->size))) {
                value = (char) *(where);
                self->pos += 1;
                return Py_BuildValue("c", (char) *(where));