[Pyrex] C-API implementation in Pyrex 0.9.6
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Oct 13 22:45:09 CEST 2007
Stefan Behnel wrote:
> As I said, Pyrex doesn't currently allow me to distinguish between public and
> non-public attributes of extension types.
If you're exporting any fields of an extension type at all,
you *have* to export all of them, so that client code can
get the struct layout right.
If those fields are pointers or references to other extension
types, you don't need to export the types of the things they
refer to, but you need at least an opaque declaration for them --
as with xmlDoc and xmlNode in the last example I posted.
Looking at what I'm putting in the .h files, I've realised
that there is some stuff in there which doesn't really need
to be there, and I'm working on fixing that. However, the
generated code should at least compile and work correctly
the way things are, if you declare things in the right places
and cimport them where they're needed.
--
Greg
More information about the Pyrex
mailing list