diff options
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r-- | Objects/rangeobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index da1d703..f858cd2 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -1066,8 +1066,7 @@ longrangeiter_next(longrangeiterobject *r) result = PyNumber_Add(r->start, product); Py_DECREF(product); if (result) { - Py_DECREF(r->index); - r->index = new_index; + Py_SETREF(r->index, new_index); } else { Py_DECREF(new_index); |