summaryrefslogtreecommitdiffstats
path: root/Objects/funcobject.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-15 17:28:34 (GMT)
committerThomas Wouters <thomas@python.org>2006-04-15 17:28:34 (GMT)
commitedf17d8798e65c10c970ef86f7374f6c1b51027a (patch)
tree743ac540a38640d5b550c9b9636ca8ee5f86a0dd /Objects/funcobject.c
parented8f78312654d74329892252d720d78765495c38 (diff)
downloadcpython-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/funcobject.c')
-rw-r--r--Objects/funcobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 00ae2eb..b86319c 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -655,9 +655,7 @@ cm_traverse(classmethod *cm, visitproc visit, void *arg)
static int
cm_clear(classmethod *cm)
{
- Py_XDECREF(cm->cm_callable);
- cm->cm_callable = NULL;
-
+ Py_CLEAR(cm->cm_callable);
return 0;
}