mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
This commit is contained in:
parent
a198645fa0
commit
5a57ade58e
28 changed files with 92 additions and 120 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue