diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-25 12:03:03 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-25 12:03:03 (GMT) |
commit | e1f17c6c0b66e5c1c48f960047cf9e521f9649d8 (patch) | |
tree | 005d77a9c5603a27252112fa15b5cf3eddb646c7 /Objects | |
parent | 0861ccbff42e5ec18f5234db88db84179bd2a760 (diff) | |
download | cpython-e1f17c6c0b66e5c1c48f960047cf9e521f9649d8.zip cpython-e1f17c6c0b66e5c1c48f960047cf9e521f9649d8.tar.gz cpython-e1f17c6c0b66e5c1c48f960047cf9e521f9649d8.tar.bz2 |
unicodeobject.c: fix a compiler warning on Windows 64 bits
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8f6cc9e..72272c7 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); |