summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-11 23:24:22 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-11 23:24:22 (GMT)
commit40c397dd560b8394b1b97b30ab2c9946b2a32584 (patch)
treebbab30ffd6a5ccb9ded86ed0b1afbed541779cc5 /Objects
parent9a9471ca1cf044ed7e466cee9a84401824201dd7 (diff)
downloadcpython-40c397dd560b8394b1b97b30ab2c9946b2a32584.zip
cpython-40c397dd560b8394b1b97b30ab2c9946b2a32584.tar.gz
cpython-40c397dd560b8394b1b97b30ab2c9946b2a32584.tar.bz2
long_invert(): tiny speed and space optimization.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 7a70903..38ef89c 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1812,8 +1812,7 @@ long_invert(PyLongObject *v)
Py_DECREF(w);
if (x == NULL)
return NULL;
- if (x->ob_size != 0)
- x->ob_size = -(x->ob_size);
+ x->ob_size = -(x->ob_size);
return (PyObject *)x;
}