mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #21118: PyLong_AS_LONG() result type is long
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
This commit is contained in:
parent
800cae3007
commit
4dd25256e2
1 changed files with 1 additions and 1 deletions
|
@ -8568,7 +8568,7 @@ unicode_fast_translate_lookup(PyObject *mapping, Py_UCS1 ch,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if (PyLong_Check(item)) {
|
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
|
/* PyLong_AS_LONG() cannot fail, charmaptranslate_lookup() already
|
||||||
used it */
|
used it */
|
||||||
if (127 < replace) {
|
if (127 < replace) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue