Skip to content

Commit ba919b0

Browse files
committed
Fix crash running TaskTester
1 parent 12873c0 commit ba919b0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

dtool/src/interrogate/interfaceMaker.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ check_protocols() {
145145
if (func->_ifunc.get_name() == "__traverse__") {
146146
// If we have a method named __traverse__, we implement Python's
147147
// cyclic garbage collection protocol.
148-
_protocol_types |= PT_python_gc;
148+
//XXX disabled for now because it's too unstable.
149+
//_protocol_types |= PT_python_gc;
149150
}
150151
}
151152

dtool/src/interrogate/interfaceMakerPythonNative.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,10 +2730,9 @@ write_module_class(ostream &out, Object *obj) {
27302730
}
27312731

27322732
string gcflag;
2733-
// Disabled for now because it's too unstable.
2734-
/*if (obj->_protocol_types & Object::PT_python_gc) {
2733+
if (obj->_protocol_types & Object::PT_python_gc) {
27352734
gcflag = " | Py_TPFLAGS_HAVE_GC";
2736-
}*/
2735+
}
27372736

27382737
// long tp_flags;
27392738
if (has_local_getbuffer) {
@@ -2759,10 +2758,12 @@ write_module_class(ostream &out, Object *obj) {
27592758
}
27602759

27612760
// traverseproc tp_traverse;
2762-
write_function_slot(out, 4, slots, "tp_traverse");
2761+
out << " 0, // tp_traverse\n";
2762+
//write_function_slot(out, 4, slots, "tp_traverse");
27632763

27642764
// inquiry tp_clear;
2765-
write_function_slot(out, 4, slots, "tp_clear");
2765+
out << " 0, // tp_clear\n";
2766+
//write_function_slot(out, 4, slots, "tp_clear");
27662767

27672768
// richcmpfunc tp_richcompare;
27682769
if (has_local_richcompare) {

0 commit comments

Comments
 (0)