From b9f4c9daad84a55599b12f2bb091eabcada14c06 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 23 Apr 2012 21:45:40 -0400 Subject: make pointer arith c89 --- Objects/unicodeobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 27492c8..7efa939 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); -- cgit v0.12