changeset: 90171:cb632988bc09 user: Victor Stinner date: Tue Apr 08 09:14:21 2014 +0200 files: Objects/unicodeobject.c description: Issue #21118: PyLong_AS_LONG() result type is long Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type. diff -r c507da0b573f -r cb632988bc09 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Mon Apr 07 23:33:29 2014 -0500 +++ b/Objects/unicodeobject.c Tue Apr 08 09:14:21 2014 +0200 @@ -8568,7 +8568,7 @@ return 1; } else if (PyLong_Check(item)) { - Py_UCS4 replace = (Py_UCS4)PyLong_AS_LONG(item); + long replace = PyLong_AS_LONG(item); /* PyLong_AS_LONG() cannot fail, charmaptranslate_lookup() already used it */ if (127 < replace) {