On Nov 22, 2008, at 11:08 PM, Tim Wakeham wrote:

> Ok, I've done a bit of testing and the problem seems to be in  
> recursive
> ctypedef's.
>
> Eg.
>
> ctypedef struct foo:
>       int count
>       foo *bar
>
> causes the bug in the outputted code.  Remove the reference to  
> itself and
> the problem goes away.
>
> cdef struct foo:
>       int count
>       foo *bar
>
> compiles fine.  I'm guessing that even if a recursive type def isn't
> allowed, then the cython
> translator should complain about it before gcc is ever invoked.   
> The easy
> way around it is to
> do the C thing and do a plain cdef first, then do the ctypedef like
>
> cdef struct foo:
>       int count
>       foo *bar
>
> ctypedef foo FOO
>
> Hope this helps.

The bug has been fixed.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to