[Pyrex] Subclassing a non-GC type
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jan 29 01:47:22 CET 2008
Lenard Lindstrom wrote:
> Looking at the inherit_special function in typeobject.c I see that
> PyType_Ready promotes tp_traverse, tp_clear and HAVE_GC.
In that case, it should be sufficient to just omit tp_traverse,
tp_clear and HAVE_GC on any type that doesn't have Python
valued C attributes.
I think the reason I didn't do that initially was that
PyType_Ready didn't do all the right things back then, and
not fully understanding what was going on, I didn't want
to be too clever.
--
Greg
More information about the Pyrex
mailing list