mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
This commit is contained in:
commit
f006940351
28 changed files with 92 additions and 120 deletions
|
|
@ -753,8 +753,7 @@ deepcopy(PyObject** object, PyObject* memo)
|
|||
if (!copy)
|
||||
return 0;
|
||||
|
||||
Py_DECREF(*object);
|
||||
*object = copy;
|
||||
Py_SETREF(*object, copy);
|
||||
|
||||
return 1; /* success */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue