[Python-Dev] Re: tp_clear return value

Greg Ewing greg@cosc.canterbury.ac.nz
Fri, 11 Apr 2003 12:29:37 +1200 (NZST)


> I've looked at every traverse slot in the core, and there's no problem
> with those.  I don't think that's an accident -- the only purpose of
> an object's tp_traverse is to invoke the visit callback on the
> non-NULL PyObject* pointers the object has.  So, e.g., there isn't an
> incref or decref in any of 'em now;

But what about the *visit function*? You need to take
account of what it might do as well. And if it's ever
used for something beside GC, it could do anything.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+