diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-23 19:37:02 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-23 19:37:02 (GMT) |
commit | d08b4c4524a31695d7e63768c02f472c9cb54fbd (patch) | |
tree | b81cade431fa30d6446fef0122a3796b0876c8a2 /Objects/dictobject.c | |
parent | d22162bac7e42ccf90571ee2607c9c42ed2df3fe (diff) | |
download | cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.zip cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.tar.gz cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.tar.bz2 |
part 2 of Neil Schemenauer's GC patches:
This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 2d33b92..ce38f11 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1087,7 +1087,7 @@ PyTypeObject PyDict_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, "dictionary", - sizeof(dictobject), + sizeof(dictobject) + PyGC_INFO_SIZE, 0, (destructor)dict_dealloc, /*tp_dealloc*/ (printfunc)dict_print, /*tp_print*/ @@ -1104,7 +1104,7 @@ PyTypeObject PyDict_Type = { 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /*tp_flags*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /*tp_flags*/ 0, /* tp_doc */ (traverseproc)dict_traverse, /* tp_traverse */ (inquiry)dict_tp_clear, /* tp_clear */ |