David Cournapeau wrote:

> Notice how the recursive is referenced through a typedef. In C, this
> is solved by forward declaring the struct through a typedef before the
> struct declaration. But AFAIK, you can't do that in cython.

Not sure about Cython, but the following works in Pyrex:

   cdef struct foo

   ctypedef foo foo_t

   cdef struct foo:
     foo_t *f

i.e. although you can't forward-declare and typedef
in one go, you can forward declare the struct and
then typedef it.


-- 
Greg
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to