From: Victor Stinner Date: Fri, 25 Jul 2014 12:03:03 +0000 (+0200) Subject: unicodeobject.c: fix a compiler warning on Windows 64 bits X-Git-Tag: v3.5.0a1~1201 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1f17c6c0b66e5c1c48f960047cf9e521f9649d8;p=thirdparty%2FPython%2Fcpython.git unicodeobject.c: fix a compiler warning on Windows 64 bits --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8f6cc9e0b34d..72272c70528b 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7015,7 +7015,8 @@ decode_code_page_errors(UINT code_page, assert(outsize <= PyUnicode_WSTR_LENGTH(*v)); if (unicode_resize(v, outsize) < 0) goto error; - ret = in - startin; + /* (in - startin) <= size and size is an int */ + ret = Py_SAFE_DOWNCAST(in - startin, Py_ssize_t, int); error: Py_XDECREF(encoding_obj);