[Pyrex] Opaque structures and Extension Types
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu May 15 01:47:33 CEST 2008
Roberto Cavada wrote:
> My way of handling allocation and
> initialization of classes in C would require that __cinit__ of
> derived class would be not called at all, as for example
> Worker_create already handles the allocation and initialization of
> Person and Worker structures.
I think you'll just have to initialise the struct in
__init__ rather than __cinit__, then you'll get
control over whether the base class __init__ is
called or not.
It's not entirely safe, but it's about the best that
can be done until I do something about providing a
more Python-like __new__ method.
--
Greg
More information about the Pyrex
mailing list