Re: Does __Pyx_ImportType need to check struct sizes? (Cython-relevant, too)
Greg Ewing <[email protected]> Wed, 03 Jun 2009 11:53:01 +1200
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
Robert Bradshaw wrote: > On Jun 1, 2009, at 5:10 PM, Greg Ewing wrote: > >>How is that going to work for types that weren't >>created using Pyrex/Cython? > > It won't, but do we check for the sizes of those types anyways? As far as I remember, yes. Pyrex has no way of knowing whether a cimported extension type was defined using Pyrex or not. It just relies on the C compiler knowing the size of the object struct, which it should do in either case. Changing this would require adding some kind of syntax for declaring that an extension type is a Pyrex-defined one, and it would make non-Pyrex extension types into second-class citizens in some respects. -- Greg