summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-05-08 08:03:09 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-05-08 08:03:09 (GMT)
commite97ecba241118e28100c70c5f48fcaabf32b79b7 (patch)
tree6bd3d961f97df8d378960542484d917bfd712aba /Objects
parent06f5a53a7a663b5e4195e7faca9c2e75687e85ca (diff)
downloadcpython-e97ecba241118e28100c70c5f48fcaabf32b79b7.zip
cpython-e97ecba241118e28100c70c5f48fcaabf32b79b7.tar.gz
cpython-e97ecba241118e28100c70c5f48fcaabf32b79b7.tar.bz2
Merged revisions 80961 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80961 | mark.dickinson | 2010-05-08 09:01:19 +0100 (Sat, 08 May 2010) | 2 lines Issue #8659: Remove redundant ABS calls. Thanks Daniel Stutzbach. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 13e9721..2229aed 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -2492,10 +2492,7 @@ long_compare(PyLongObject *a, PyLongObject *b)
Py_ssize_t sign;
if (Py_SIZE(a) != Py_SIZE(b)) {
- if (ABS(Py_SIZE(a)) == 0 && ABS(Py_SIZE(b)) == 0)
- sign = 0;
- else
- sign = Py_SIZE(a) - Py_SIZE(b);
+ sign = Py_SIZE(a) - Py_SIZE(b);
}
else {
Py_ssize_t i = ABS(Py_SIZE(a));
@@ -3772,7 +3769,7 @@ long_abs(PyLongObject *v)
static int
long_bool(PyLongObject *v)
{
- return ABS(Py_SIZE(v)) != 0;
+ return Py_SIZE(v) != 0;
}
static PyObject *