[Python-checkins] r80961 - python/trunk/Objects/longobject.c
mark.dickinson
python-checkins at python.org
Sat May 8 10:01:19 CEST 2010
Author: mark.dickinson
Date: Sat May 8 10:01:19 2010
New Revision: 80961
Log:
Issue #8659: Remove redundant ABS calls. Thanks Daniel Stutzbach.
Modified:
python/trunk/Objects/longobject.c
Modified: python/trunk/Objects/longobject.c
==============================================================================
--- python/trunk/Objects/longobject.c (original)
+++ python/trunk/Objects/longobject.c Sat May 8 10:01:19 2010
@@ -2354,10 +2354,7 @@
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));
@@ -3606,7 +3603,7 @@
static int
long_nonzero(PyLongObject *v)
{
- return ABS(Py_SIZE(v)) != 0;
+ return Py_SIZE(v) != 0;
}
static PyObject *
More information about the Python-checkins
mailing list