mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for
tp_clear methods.
This commit is contained in:
parent
ed8f783126
commit
edf17d8798
8 changed files with 30 additions and 57 deletions
|
@ -53,10 +53,8 @@ tb_traverse(PyTracebackObject *tb, visitproc visit, void *arg)
|
|||
static void
|
||||
tb_clear(PyTracebackObject *tb)
|
||||
{
|
||||
Py_XDECREF(tb->tb_next);
|
||||
Py_XDECREF(tb->tb_frame);
|
||||
tb->tb_next = NULL;
|
||||
tb->tb_frame = NULL;
|
||||
Py_CLEAR(tb->tb_next);
|
||||
Py_CLEAR(tb->tb_frame);
|
||||
}
|
||||
|
||||
PyTypeObject PyTraceBack_Type = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue