[Pyrex] [Cython-dev] fix for tp_clear()
Lenard Lindstrom
len-l at telus.net
Sun Jan 13 19:00:08 CET 2008
Stefan Behnel wrote:
> Hi,
>
> while I was at it, here is a patch that diverts the tp_clear/tp_traverse type
> function pointers to the parent type if the type itself does not have any
> object attributes.
>
> It's a bit clumsy in that it decides the availability of the parent functions
> based on the module name. What would be a better way to find out if the parent
> type was defined in the same scope?
>
>
If a subclass has no object attributes then leave its
tp_clear/tp_traverse slots empty. PyType_Ready will fill them if nessecary.
--
Lenard Lindstrom
<len-l at telus.net>
More information about the Pyrex
mailing list