diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index fe5d9d90d14fd97..9194ca84290bfb4 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -216,11 +216,6 @@ static long compute_range_length_long(PyObject *start, } } -static void print_str(PyObject *o) -{ - PyObject_Print(o, stdout, Py_PRINT_RAW); -} - /* Return number of items in range (lo, hi, step) as a PyLong object, * when arguments are PyLong objects. Arguments MUST return 1 with @@ -310,7 +305,6 @@ compute_range_length(PyObject *start, PyObject *stop, PyObject *step) Py_DECREF(diff); Py_DECREF(step); Py_DECREF(tmp1); - return result; Fail: @@ -1159,7 +1153,7 @@ range_iter(PyObject *seq) goto long_range; } - if (r->start == (PyLongObject *)_PyLong_GetZero() && r->step == _PyLong_GetOne() ) { + if (r->start == _PyLong_GetZero() && r->step == _PyLong_GetOne() ) { /* fast path for one argument range */ return fast_range_iter(0, lstop, 1, Py_MAX(0, (long)lstop)); }