[Pyrex] Inheritance (or lack thereof) of tp_flags

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Oct 16 01:26:45 CEST 2005


I've just tracked down a Pyrex bug concerning an
extension type inheriting from a built-in type that
supports GC.

I had assumed that PyType_Ready would arrange for
the Py_TPFLAGS_HAVE_GC flag to be inherited if
necessary, but it seems that this isn't done.

Since very bad things seem to happen if a base
type has Py_TPFLAGS_HAVE_GC set but a type derived
from it doesn't, is this perhaps something that
should be fixed?

And if so, are there any other tp_flags that should
be inherited?

Greg



More information about the Pyrex mailing list