diff options
author | Thomas Wouters <thomas@python.org> | 2006-04-15 17:28:34 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-04-15 17:28:34 (GMT) |
commit | edf17d8798e65c10c970ef86f7374f6c1b51027a (patch) | |
tree | 743ac540a38640d5b550c9b9636ca8ee5f86a0dd /Python/traceback.c | |
parent | ed8f78312654d74329892252d720d78765495c38 (diff) | |
download | cpython-edf17d8798e65c10c970ef86f7374f6c1b51027a.zip cpython-edf17d8798e65c10c970ef86f7374f6c1b51027a.tar.gz cpython-edf17d8798e65c10c970ef86f7374f6c1b51027a.tar.bz2 |
Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, for
tp_clear methods.
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 567f23d..cdbec2b 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 = { |