mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +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
|
@ -236,8 +236,7 @@ BaseException_set_tb(PyBaseExceptionObject *self, PyObject *tb)
|
|||
}
|
||||
|
||||
Py_XINCREF(tb);
|
||||
Py_XDECREF(self->traceback);
|
||||
self->traceback = tb;
|
||||
Py_SETREF(self->traceback, tb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue