summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_decimal/_decimal.c3
-rw-r--r--Modules/_testcapimodule.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 9b89fa4..e2979a5 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -696,8 +696,7 @@ static PyTypeObject PyDecSignalDictMixin_Type =
PyObject_GenericGetAttr, /* tp_getattro */
(setattrofunc) 0, /* tp_setattro */
(PyBufferProcs *) 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|
- Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
0, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index d926ad8..c759dcc 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -6595,6 +6595,13 @@ heapctype_init(PyObject *self, PyObject *args, PyObject *kwargs)
return 0;
}
+static int
+heapgcctype_traverse(HeapCTypeObject *self, visitproc visit, void *arg)
+{
+ Py_VISIT(Py_TYPE(self));
+ return 0;
+}
+
static void
heapgcctype_dealloc(HeapCTypeObject *self)
{
@@ -6608,6 +6615,7 @@ static PyType_Slot HeapGcCType_slots[] = {
{Py_tp_init, heapctype_init},
{Py_tp_members, heapctype_members},
{Py_tp_dealloc, heapgcctype_dealloc},
+ {Py_tp_traverse, heapgcctype_traverse},
{Py_tp_doc, (char*)heapgctype__doc__},
{0, 0},
};