From edf17d8798e65c10c970ef86f7374f6c1b51027a Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Sat, 15 Apr 2006 17:28:34 +0000 Subject: Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for tp_clear methods. --- Python/traceback.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Python') diff --git a/Python/traceback.c b/Python/traceback.c index 567f23d990..cdbec2b470 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -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 = { -- cgit v1.2.1