[Python-checkins] cpython: make pointer arith c89
benjamin.peterson
python-checkins at python.org
Tue Apr 24 03:45:45 CEST 2012
http://hg.python.org/cpython/rev/de0b6e0d8cb9
changeset: 76512:de0b6e0d8cb9
user: Benjamin Peterson <benjamin at python.org>
date: Mon Apr 23 21:45:40 2012 -0400
summary:
make pointer arith c89
files:
Objects/unicodeobject.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1976,8 +1976,8 @@
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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list