[Pyrex] classes and callbacks

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Oct 11 23:22:07 UTC 2006


Test Drive wrote:
> Thanks for considering this. I think Lenard Lindstrom got it pretty right.
> Greg, consider callabcks which take functions as parameters.

If I understand correctly, what you're asking for is
the equivalent of a bound method for a C method of
an extension type. I don't know how I would implement
that, though.

In this case I'd say the C API you're using is
broken, because it doesn't allow for an arbitrary
data pointer to be associated with the callback.
Using a mapping dict seems like as good a
workaround as any.

--
Greg



More information about the Pyrex mailing list