From: Benjamin Peterson Date: Tue, 24 Apr 2012 01:45:40 +0000 (-0400) Subject: make pointer arith c89 X-Git-Tag: v3.3.0a3~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9f4c9daad84a55599b12f2bb091eabcada14c06;p=thirdparty%2FPython%2Fcpython.git make pointer arith c89 --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 27492c80ba48..7efa939f0f0a 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1976,8 +1976,8 @@ _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end) kind = PyUnicode_KIND(unicode); startptr = PyUnicode_DATA(unicode); - endptr = startptr + end * kind; - startptr += start * kind; + endptr = (char *)startptr + end * kind; + startptr = (char *)startptr + start * kind; switch(kind) { case PyUnicode_1BYTE_KIND: return ucs1lib_find_max_char(startptr, endptr);