summaryrefslogtreecommitdiffstats
path: root/Doc/ext
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-06-28 15:22:16 (GMT)
committerBarry Warsaw <barry@python.org>2003-06-28 15:22:16 (GMT)
commit6891cd3aa37ac3d27de5563849ef848eed1fe411 (patch)
tree0049d88ef04c51d8f1aa776f0dc26132382c1eb4 /Doc/ext
parent6c71091fbe9698255ea67f4ea2f61a1b586ff827 (diff)
downloadcpython-6891cd3aa37ac3d27de5563849ef848eed1fe411.zip
cpython-6891cd3aa37ac3d27de5563849ef848eed1fe411.tar.gz
cpython-6891cd3aa37ac3d27de5563849ef848eed1fe411.tar.bz2
A few minor improvements
Diffstat (limited to 'Doc/ext')
-rw-r--r--Doc/ext/newtypes.tex7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/ext/newtypes.tex b/Doc/ext/newtypes.tex
index df78d54..2b915f3 100644
--- a/Doc/ext/newtypes.tex
+++ b/Doc/ext/newtypes.tex
@@ -723,8 +723,9 @@ Noddy_traverse(Noddy *self, visitproc visit, void *arg)
\end{verbatim}
For each subobject that can participate in cycles, we need to call the
-\cfunction{visit} function passed to the traversal method passing the
-subobject and the extra argument passed to the traversal method.
+\cfunction{visit} function, which is passed to the traversal method.
+The \cfunction{visit} function takes as arguments the subobject and
+the extra argument \var{arg} passed to the traversal method.
We also need to provide a method for clearing any subobjects that can
participate in cycles. We implement the method and reimplement the
@@ -757,7 +758,7 @@ Finally, we add the \constant{Py_TPFLAGS_HAVE_GC} flag to the class flags:
\end{verbatim}
That's pretty much it. If we had written custom \member{tp_alloc} or
-\member{tp_free} slots, we'd need to modify then for cyclic-garbage
+\member{tp_free} slots, we'd need to modify them for cyclic-garbage
collection. Most extensions will use the versions automatically
provided.