]> granicus.if.org Git - python/commitdiff
long_invert(): tiny speed and space optimization.
authorTim Peters <tim.peters@gmail.com>
Tue, 11 Sep 2001 23:24:22 +0000 (23:24 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 11 Sep 2001 23:24:22 +0000 (23:24 +0000)
Objects/longobject.c

index 7a709033fb12ff2636c5a4b7c207c4d52a88fb75..38ef89c96283ea5d43d8fdaec28c91be557b42e4 100644 (file)
@@ -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;
 }