mirror of
https://github.com/ml-explore/mlx.git
synced 2025-11-08 21:38:14 +08:00
fix py gc edge case (#2079)
This commit is contained in:
@@ -16,12 +16,12 @@ struct gc_func {
|
||||
};
|
||||
|
||||
int gc_func_tp_traverse(PyObject* self, visitproc visit, void* arg) {
|
||||
Py_VISIT(Py_TYPE(self));
|
||||
gc_func* w = (gc_func*)self;
|
||||
Py_VISIT(w->func);
|
||||
for (auto d : w->deps) {
|
||||
Py_VISIT(d);
|
||||
}
|
||||
Py_VISIT(Py_TYPE(self));
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user