diff Python/traceback.c @ 37748:d1547426ab61 legacy-trunk

Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for tp_clear methods.
author Thomas Wouters <thomas@python.org>
date Sat, 15 Apr 2006 17:28:34 +0000
parents 3b7b295cca90
children 7b2e436a4a21
line wrap: on
line diff
--- a/Python/traceback.c	Sat Apr 15 12:47:23 2006 +0000
+++ b/Python/traceback.c	Sat Apr 15 17:28:34 2006 +0000
@@ -53,10 +53,8 @@
 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 = {