diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-04-08 07:14:21 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-04-08 07:14:21 (GMT) |
commit | 4dd25256e25b2f03d0140e53f0813d482e3b07b5 (patch) | |
tree | 0aa0c77f23db33d25d6e4ccdcd25570709a351f7 /Objects | |
parent | 800cae30075bede409561b5ad5b1b72bd49c6fa5 (diff) | |
download | cpython-4dd25256e25b2f03d0140e53f0813d482e3b07b5.zip cpython-4dd25256e25b2f03d0140e53f0813d482e3b07b5.tar.gz cpython-4dd25256e25b2f03d0140e53f0813d482e3b07b5.tar.bz2 |
Issue #21118: PyLong_AS_LONG() result type is long
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 921d7aa..af70ede 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -8568,7 +8568,7 @@ unicode_fast_translate_lookup(PyObject *mapping, Py_UCS1 ch, 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) { |