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 /Objects/cellobject.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 'Objects/cellobject.c')
-rw-r--r-- | Objects/cellobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/cellobject.c b/Objects/cellobject.c index 9704403..e617e5e 100644 --- a/Objects/cellobject.c +++ b/Objects/cellobject.c @@ -81,8 +81,7 @@ cell_traverse(PyCellObject *op, visitproc visit, void *arg) static int cell_clear(PyCellObject *op) { - Py_XDECREF(op->ob_ref); - op->ob_ref = NULL; + Py_CLEAR(op->ob_ref); return 0; } |