[Python-checkins] cpython: Issue #21118: PyLong_AS_LONG() result type is long
victor.stinner
python-checkins at python.org
Tue Apr 8 09:14:31 CEST 2014
http://hg.python.org/cpython/rev/cb632988bc09
changeset: 90171:cb632988bc09
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Apr 08 09:14:21 2014 +0200
summary:
Issue #21118: PyLong_AS_LONG() result type is long
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
files:
Objects/unicodeobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list