Commit 522f0f22 authored by Guido van Rossum's avatar Guido van Rossum

Make it compile with C89.

parent 37c91ba6
...@@ -1447,6 +1447,7 @@ handle_range_longs(PyObject *self, PyObject *args) ...@@ -1447,6 +1447,7 @@ handle_range_longs(PyObject *self, PyObject *args)
bign = get_len_of_range_longs(ilow, ihigh, istep); bign = get_len_of_range_longs(ilow, ihigh, istep);
else { else {
int step_zero = PyObject_RichCompareBool(istep, zero, Py_EQ); int step_zero = PyObject_RichCompareBool(istep, zero, Py_EQ);
PyObject *neg_istep;
if (step_zero < 0) if (step_zero < 0)
goto Fail; goto Fail;
if (step_zero) { if (step_zero) {
...@@ -1454,7 +1455,7 @@ handle_range_longs(PyObject *self, PyObject *args) ...@@ -1454,7 +1455,7 @@ handle_range_longs(PyObject *self, PyObject *args)
"range() step argument must not be zero"); "range() step argument must not be zero");
goto Fail; goto Fail;
} }
PyObject *neg_istep = PyNumber_Negative(istep); neg_istep = PyNumber_Negative(istep);
if (neg_istep == NULL) if (neg_istep == NULL)
goto Fail; goto Fail;
bign = get_len_of_range_longs(ihigh, ilow, neg_istep); bign = get_len_of_range_longs(ihigh, ilow, neg_istep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment