April 9, 2003
9:41 p.m.
"Martin v. L?wis" wrote:
Neil Schemenauer wrote:
In retrospect, I think both tp_traverse and tp_clear should have returned "void".
While this is true for tp_clear, tp_traverse is actually more general. gc.get_referrers uses tp_traverse, for something other than collection.
Could the visit procedure keep track of errors? Something like: struct result { int error; /* true if an error occured while traversing */ /* other results */ } static void myvisit(PyObject* obj, struct result *r) { if (!r->error) { <do stuff, set r->error of error occurs> } }