[Python-checkins] python/dist/src/Objects setobject.c,1.25,1.26
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sun Jun 13 04:20:48 EDT 2004
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32152
Modified Files:
setobject.c
Log Message:
Remove unnecessary GC support. Sets cannot have cycles.
Index: setobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/setobject.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** setobject.c 10 Jun 2004 22:41:48 -0000 1.25
--- setobject.c 13 Jun 2004 08:20:46 -0000 1.26
***************
*** 115,119 ****
set_dealloc(PySetObject *so)
{
- PyObject_GC_UnTrack(so);
if (so->weakreflist != NULL)
PyObject_ClearWeakRefs((PyObject *) so);
--- 115,118 ----
***************
*** 122,133 ****
}
- static int
- set_traverse(PySetObject *so, visitproc visit, void *arg)
- {
- if (so->data)
- return visit(so->data, arg);
- return 0;
- }
-
static PyObject *
set_iter(PySetObject *so)
--- 121,124 ----
***************
*** 1018,1026 ****
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
set_doc, /* tp_doc */
! (traverseproc)set_traverse, /* tp_traverse */
! (inquiry)set_tp_clear, /* tp_clear */
(richcmpfunc)set_richcompare, /* tp_richcompare */
offsetof(PySetObject, weakreflist), /* tp_weaklistoffset */
--- 1009,1017 ----
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
set_doc, /* tp_doc */
! 0, /* tp_traverse */
! 0, /* tp_clear */
(richcmpfunc)set_richcompare, /* tp_richcompare */
offsetof(PySetObject, weakreflist), /* tp_weaklistoffset */
***************
*** 1038,1042 ****
PyType_GenericAlloc, /* tp_alloc */
set_new, /* tp_new */
! PyObject_GC_Del, /* tp_free */
};
--- 1029,1033 ----
PyType_GenericAlloc, /* tp_alloc */
set_new, /* tp_new */
! PyObject_Del, /* tp_free */
};
***************
*** 1113,1120 ****
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
frozenset_doc, /* tp_doc */
! (traverseproc)set_traverse, /* tp_traverse */
0, /* tp_clear */
(richcmpfunc)set_richcompare, /* tp_richcompare */
--- 1104,1111 ----
0, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_WEAKREFS, /* tp_flags */
frozenset_doc, /* tp_doc */
! 0, /* tp_traverse */
0, /* tp_clear */
(richcmpfunc)set_richcompare, /* tp_richcompare */
***************
*** 1133,1136 ****
PyType_GenericAlloc, /* tp_alloc */
frozenset_new, /* tp_new */
! PyObject_GC_Del, /* tp_free */
};
--- 1124,1127 ----
PyType_GenericAlloc, /* tp_alloc */
frozenset_new, /* tp_new */
! PyObject_Del, /* tp_free */
};
More information about the Python-checkins
mailing list