Issue #20440: Massive replacing unsafe attribute setting code with special

macro Py_SETREF.
This commit is contained in:
Serhiy Storchaka 2015-12-24 10:35:59 +02:00
parent a198645fa0
commit 5a57ade58e
28 changed files with 92 additions and 120 deletions

View file

@ -756,8 +756,7 @@ deepcopy(PyObject** object, PyObject* memo)
if (!copy)
return 0;
Py_DECREF(*object);
*object = copy;
Py_SETREF(*object, copy);
return 1; /* success */
}