summaryrefslogtreecommitdiff
path: root/Objects/cellobject.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-15 21:47:09 +0000
committerThomas Wouters <thomas@python.org>2006-04-15 21:47:09 +0000
commit58c4139c1d6d525e89bb2e6233422e5d2fc38e14 (patch)
treea96de885b9502d53ae464132dc15b22f9279ee2d /Objects/cellobject.c
parent2b18f142735ff17d4c6b8a4969b1b7b8a4cb83a7 (diff)
downloadcpython-58c4139c1d6d525e89bb2e6233422e5d2fc38e14.tar.gz
Use Py_VISIT in all tp_traverse methods, instead of traversing manually or
using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
Diffstat (limited to 'Objects/cellobject.c')
-rw-r--r--Objects/cellobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index e617e5e5f3..da48dea745 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -73,8 +73,7 @@ cell_repr(PyCellObject *op)
static int
cell_traverse(PyCellObject *op, visitproc visit, void *arg)
{
- if (op->ob_ref)
- return visit(op->ob_ref, arg);
+ Py_VISIT(op->ob_ref);
return 0;
}