[Python-Dev] A little GC confusion (original) (raw)

Martin v. Loewis martin@v.loewis.de
23 Feb 2002 01:43:55 +0100


"David Abrahams" <david.abrahams@rcn.com> writes:

static int typeisgc(PyTypeObject *type) { return type->tpflags & PyTPFLAGSHEAPTYPE; }

so, wouldn't it make more sense that the Python source always checks PyTPFLAGSHEAPTYPE before tpisgc?

No. Most GC objects do not have the HEAPTYPE flag (they actually aren't even type objects).

Regards, Martin