[Python-checkins] python/dist/src/Objects unicodeobject.c,2.124.6.11,2.124.6.12 stringobject.c,2.147.6.8,2.147.6.9

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Mon, 23 Sep 2002 14:17:29 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv8506

Modified Files:
      Tag: release22-maint
	unicodeobject.c stringobject.c 
Log Message:
Backport from trunk:

unicodeobject.c 2.169
stringobject.c 2.189

Fix warnings on 64-bit platforms about casts from pointers to ints.
Two of these were real bugs.


Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.124.6.11
retrieving revision 2.124.6.12
diff -C2 -d -r2.124.6.11 -r2.124.6.12
*** unicodeobject.c	23 Sep 2002 20:46:52 -0000	2.124.6.11
--- unicodeobject.c	23 Sep 2002 21:17:27 -0000	2.124.6.12
***************
*** 5643,5647 ****
                               "at index %i",
                               (31<=c && c<=126) ? (int)c : '?', 
!                              (int)c, (fmt -1 - PyUnicode_AS_UNICODE(uformat)));
                  goto onError;
  	    }
--- 5643,5648 ----
                               "at index %i",
                               (31<=c && c<=126) ? (int)c : '?', 
!                              (int)c,
!                              (int)(fmt -1 - PyUnicode_AS_UNICODE(uformat)));
                  goto onError;
  	    }

Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.147.6.8
retrieving revision 2.147.6.9
diff -C2 -d -r2.147.6.8 -r2.147.6.9
*** stringobject.c	20 Aug 2002 16:57:58 -0000	2.147.6.8
--- stringobject.c	23 Sep 2002 21:17:27 -0000	2.147.6.9
***************
*** 3582,3586 ****
  				  "unsupported format character '%c' (0x%x) "
  				  "at index %i",
! 				  c, c, fmt - 1 - PyString_AsString(format));
  				goto error;
  			}
--- 3582,3587 ----
  				  "unsupported format character '%c' (0x%x) "
  				  "at index %i",
! 				  c, c,
! 				  (int)(fmt - 1 - PyString_AsString(format)));
  				goto error;
  			}