Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eendebakpt committed Mar 6, 2024
1 parent 4404f03 commit d2ed85a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Objects/rangeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit d2ed85a

Please sign in to comment.