mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-99537: Use Py_SETREF(var, NULL) in C code (#99687)
Replace "Py_DECREF(var); var = NULL;" with "Py_SETREF(var, NULL);".
This commit is contained in:
parent
5d9183c7ad
commit
81f7359f67
22 changed files with 44 additions and 87 deletions
|
@ -4344,8 +4344,7 @@ save(PicklerObject *self, PyObject *obj, int pers_save)
|
|||
if (reduce_value != Py_NotImplemented) {
|
||||
goto reduce;
|
||||
}
|
||||
Py_DECREF(reduce_value);
|
||||
reduce_value = NULL;
|
||||
Py_SETREF(reduce_value, NULL);
|
||||
}
|
||||
|
||||
if (type == &PyType_Type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue