[Python-Dev] ANSIfication problems: warnings in marshal.c
Fredrik Lundh
Fredrik Lundh" <effbot@telia.com
Sun, 23 Jul 2000 20:16:10 +0200
w_byte is a macro that either calls C's putc, or w_more.
putc takes an int, and all calls to w_byte make sure they're
passing the right thing.
however, w_more is defined to take a char, which results in
warnings from MSVC5.
quick fix: change w_more to take an integer too:
Index: Python/marshal.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v
retrieving revision 1.53
diff -c -r1.53 marshal.c
*** Python/marshal.c 2000/07/22 18:47:25 1.53
--- Python/marshal.c 2000/07/23 18:07:07
***************
*** 55,61 ****
else w_more(c, p)
static void
! w_more(char c, WFILE *p)
{
int size, newsize;
if (p->str =3D=3D NULL)
--- 55,61 ----
else w_more(c, p)
static void
! w_more(int c, WFILE *p)
{
int size, newsize;
if (p->str =3D=3D NULL)
***************
*** 69,75 ****
p->ptr =3D PyString_AS_STRING((PyStringObject *)p->str) =
+ size;
p->end =3D
PyString_AS_STRING((PyStringObject *)p->str) + =
newsize;
! *p->ptr++ =3D c;
}
}
--- 69,75 ----
p->ptr =3D PyString_AS_STRING((PyStringObject *)p->str) =
+ size;
p->end =3D
PyString_AS_STRING((PyStringObject *)p->str) + =
newsize;
! *p->ptr++ =3D (char) c;
}
}
</F>