diff Objects/stringobject.c @ 25370:651abcf63fe1 2.2

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.
author Guido van Rossum <guido@python.org>
date Mon, 23 Sep 2002 21:17:27 +0000
parents 886686fc92a9
children 55b18394123b
line wrap: on
line diff
--- a/Objects/stringobject.c	Mon Sep 23 21:04:09 2002 +0000
+++ b/Objects/stringobject.c	Mon Sep 23 21:17:27 2002 +0000
@@ -3581,7 +3581,8 @@
 				PyErr_Format(PyExc_ValueError,
 				  "unsupported format character '%c' (0x%x) "
 				  "at index %i",
-				  c, c, fmt - 1 - PyString_AsString(format));
+				  c, c,
+				  (int)(fmt - 1 - PyString_AsString(format)));
 				goto error;
 			}
 			if (sign) {