The example above is working for me (not I'm following cython-devel
repo). Give  a try

cdef extern from *:

    ctypedef struct A # like a forward declaration ?
    ctypedef struct B # like a forward declaration ?

    ctypedef struct A:
        B* b

    ctypedef struct B:
        A* a

cdef A tmp_a
cdef B tmp_b

tmp_a.b = &tmp_b
tmp_b.a = &tmp_a



On 5/12/08, Johannes Wienke <[EMAIL PROTECTED]> wrote:
> Am 05/12/2008 09:37 PM schrieb Lisandro Dalcin:
>
> > That's what Robert warned you about!! Indeed, you have two definitions
>  > of plugData:
>
>
> Must be blind... thanks!
>
>  But how do I resolve the problem in the pxi file, that both struct
>  depend on each other withput duplicating the struct?
>
>
>  > On 5/12/08, Johannes Wienke <[EMAIL PROTECTED]> wrote:
>  >> plugin.pxi:
>  >>  -----------
>  >>  include "grab.pxi"
>  >>  cdef extern from "main/plugin.h":
>  >>         cdef struct plugData:
>  >>                 pass
>  >>
>  >>  cdef extern from "main/plugin_comm.h":
>  >>         ctypedef struct plugData:
>  >>                 plugDefinition *plug
>  >>                 char *ident
>  >>                 void *data
>  >
>  >
>  >
>
>
>
> _______________________________________________
>  Cython-dev mailing list
>  [email protected]
>  http://codespeak.net/mailman/listinfo/cython-dev
>
>
>


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to