summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-06-23 14:18:11 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-06-23 14:18:11 (GMT)
commit8caad49c30d2f9ecd09c8838bb691360e40c2665 (patch)
tree367db742417367edaea6a4dee1eea3ff2885d3db /Include/object.h
parenta392dcb2117739ad0dc7f67bd550083ee860226b (diff)
downloadcpython-8caad49c30d2f9ecd09c8838bb691360e40c2665.zip
cpython-8caad49c30d2f9ecd09c8838bb691360e40c2665.tar.gz
cpython-8caad49c30d2f9ecd09c8838bb691360e40c2665.tar.bz2
Round 1 of Neil Schemenauer's GC patches:
This patch adds the type methods traverse and clear necessary for GC implementation.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Include/object.h b/Include/object.h
index f6ceba5..e18e0e8 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -145,6 +145,8 @@ typedef int (*getwritebufferproc) Py_PROTO((PyObject *, int, void **));
typedef int (*getsegcountproc) Py_PROTO((PyObject *, int *));
typedef int (*getcharbufferproc) Py_PROTO((PyObject *, int, const char **));
typedef int (*objobjproc) Py_PROTO((PyObject *, PyObject *));
+typedef int (*visitproc) Py_PROTO((PyObject *, void *));
+typedef int (*traverseproc) Py_PROTO((PyObject *, visitproc, void *));
typedef struct {
binaryfunc nb_add;
@@ -243,9 +245,13 @@ typedef struct _typeobject {
char *tp_doc; /* Documentation string */
+ /* call function for all accessible objects */
+ traverseproc tp_traverse;
+
+ /* delete references to contained objects */
+ inquiry tp_clear;
+
/* More spares */
- long tp_xxx5;
- long tp_xxx6;
long tp_xxx7;
long tp_xxx8;