Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for

tp_clear methods.
This commit is contained in:
Thomas Wouters 2006-04-15 17:28:34 +00:00
parent ed8f783126
commit edf17d8798
8 changed files with 30 additions and 57 deletions

View file

@ -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 = {