[Python-checkins] CVS: python/dist/src/Misc ACKS,1.129,1.130
Guido van Rossum
gvanrossum@users.sourceforge.net
Tue, 23 Oct 2001 14:25:26 -0700
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv25768/Misc
Modified Files:
ACKS
Log Message:
SF patch #474175 (Jay T Miller): file.readinto arg parsing bug
The C-code in fileobject.readinto(buffer) which parses
the arguments assumes that size_t is interchangeable
with int:
size_t ntodo, ndone, nnow;
if (f->f_fp == NULL)
return err_closed();
if (!PyArg_Parse(args, "w#", &ptr, &ntodo))
return NULL;
This causes a problem on Alpha / Tru64 / OSF1 v5.1
where size_t is a long and sizeof(long) != sizeof(int).
The patch I'm proposing declares ntodo as an int. An
alternative might be to redefine w# to expect size_t.
[We can't change w# because there are probably third party modules
relying on it. GvR]
Index: ACKS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -d -r1.129 -r1.130
*** ACKS 2001/10/20 14:21:45 1.129
--- ACKS 2001/10/23 21:25:24 1.130
***************
*** 280,283 ****
--- 280,284 ----
Michael McLay
Gordon McMillan
+ Jay T. Miller
Caolan McNamara
Craig McPheeters