[Python-checkins] python/dist/src/Objects obmalloc.c,2.47,2.48 stringobject.c,2.188,2.189 unicodeobject.c,2.168,2.169
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 12 Sep 2002 07:43:43 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv27057
Modified Files:
obmalloc.c stringobject.c unicodeobject.c
Log Message:
Fix warnings on 64-bit platforms about casts from pointers to ints.
Two of these were real bugs.
Index: obmalloc.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/obmalloc.c,v
retrieving revision 2.47
retrieving revision 2.48
diff -C2 -d -r2.47 -r2.48
*** obmalloc.c 18 Jul 2002 18:49:52 -0000 2.47
--- obmalloc.c 12 Sep 2002 14:43:40 -0000 2.48
***************
*** 438,442 ****
nfreepools = ARENA_SIZE / POOL_SIZE;
assert(POOL_SIZE * nfreepools == ARENA_SIZE);
! excess = (uint)bp & POOL_SIZE_MASK;
if (excess != 0) {
--nfreepools;
--- 438,442 ----
nfreepools = ARENA_SIZE / POOL_SIZE;
assert(POOL_SIZE * nfreepools == ARENA_SIZE);
! excess = (uint) ((Py_uintptr_t)bp & POOL_SIZE_MASK);
if (excess != 0) {
--nfreepools;
Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.188
retrieving revision 2.189
diff -C2 -d -r2.188 -r2.189
*** stringobject.c 9 Sep 2002 06:17:05 -0000 2.188
--- stringobject.c 12 Sep 2002 14:43:40 -0000 2.189
***************
*** 3884,3888 ****
"unsupported format character '%c' (0x%x) "
"at index %i",
! c, c, fmt - 1 - PyString_AsString(format));
goto error;
}
--- 3884,3889 ----
"unsupported format character '%c' (0x%x) "
"at index %i",
! c, c,
! (int)(fmt - 1 - PyString_AsString(format)));
goto error;
}
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.168
retrieving revision 2.169
diff -C2 -d -r2.168 -r2.169
*** unicodeobject.c 4 Sep 2002 20:31:32 -0000 2.168
--- unicodeobject.c 12 Sep 2002 14:43:41 -0000 2.169
***************
*** 6466,6470 ****
"at index %i",
(31<=c && c<=126) ? c : '?',
! c, fmt -1 - PyUnicode_AS_UNICODE(uformat));
goto onError;
}
--- 6466,6471 ----
"at index %i",
(31<=c && c<=126) ? c : '?',
! c,
! (int)(fmt -1 - PyUnicode_AS_UNICODE(uformat)));
goto onError;
}