[Pyrex] C-API implementation in Pyrex 0.9.6
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Oct 16 08:30:21 CEST 2007
Stefan Behnel wrote:
> Hmm, so you have to make all C methods of a type public even if none of them
> *is* public? How is that about a .pyx dependency?
It's exactly the same situation as exists with struct fields.
> Now I'm actually all for dropping the "public" business and only providing the
> public mechanism...
This has nothing to do with any of the recent features --
it's always been like that.
> Pyrex could put the public fields directly
> into the type struct and provide a straight fixed-size pointer to a struct
> with the private fields and methods
That's a possibility, although it would add a pointer to the
size of every object struct for every level of subclassing,
even if there were no private fields (the pointer needs to
be allocated anyway, in case private fields are added later).
I'll consider something like this for a future version.
--
Greg
More information about the Pyrex
mailing list