unicodeobject.c: fix a compiler warning on Windows 64 bits

This commit is contained in:
Victor Stinner 2014-07-25 14:03:03 +02:00
parent 0861ccbff4
commit e1f17c6c0b
1 changed files with 2 additions and 1 deletions

View File

@ -7015,7 +7015,8 @@ decode_code_page_errors(UINT code_page,
assert(outsize <= PyUnicode_WSTR_LENGTH(*v)); assert(outsize <= PyUnicode_WSTR_LENGTH(*v));
if (unicode_resize(v, outsize) < 0) if (unicode_resize(v, outsize) < 0)
goto error; goto error;
ret = in - startin; /* (in - startin) <= size and size is an int */
ret = Py_SAFE_DOWNCAST(in - startin, Py_ssize_t, int);
error: error:
Py_XDECREF(encoding_obj); Py_XDECREF(encoding_obj);