From 67c87194fb030a584d087231d29b6676e24b7d5d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 23 Sep 2002 21:17:27 +0000 Subject: [PATCH] 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. --- Objects/stringobject.c | 3 ++- Objects/unicodeobject.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 529a424d8a1a..c601f606740d 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3581,7 +3581,8 @@ PyString_Format(PyObject *format, PyObject *args) 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) { diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b1ba48dd3735..83cd7ed00220 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5642,7 +5642,8 @@ PyObject *PyUnicode_Format(PyObject *format, "unsupported format character '%c' (0x%x) " "at index %i", (31<=c && c<=126) ? (int)c : '?', - (int)c, (fmt -1 - PyUnicode_AS_UNICODE(uformat))); + (int)c, + (int)(fmt -1 - PyUnicode_AS_UNICODE(uformat))); goto onError; } if (sign) { -- 2.47.3