[Pyrex] cdef public class bug/problems

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Nov 21 23:42:39 CET 2005


Simon Burton wrote:
> A cdef public extern class without cdef attributes causes pyrex
> to produce a .pxi file with a syntax error: it defines an empty 
> cdef extern class but does not use a "pass".

Thanks, I'll add this to the queue.

> Also, I just don't see how this mechanism can work. It looks totally broken.

Using .pxi files for cross-pyx extension type access
is really an obsolete mechanism (superseded by cimport)
so it's quite possible that it no longer works correctly.

> Don't we need to append the FooObj to the declaration in foo.pxi ?
> And shouldn't it all be inside a ' cdef extern from "foo.h" ' ?

As far as I remember, the idea was that Pyrex generates
C declarations for the type and object structs independently
for each .pyx which includes the .pxi. Since they're all
generated from the same Pyrex definition, they should all
agree with each other.

Greg




More information about the Pyrex mailing list