mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Round 1 of Neil Schemenauer's GC patches:
This patch adds the type methods traverse and clear necessary for GC implementation.
This commit is contained in:
parent
a392dcb211
commit
8caad49c30
6 changed files with 218 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue