Anonymous union inside struct

Jonne <[email protected]> Sun, 8 Jun 2008 23:24:12 +0200
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Hi!

I have the following c-code:

typedef struct expansion_t {
    int type;

    union {
        struct nunchuk_t nunchuk;
        struct classic_ctrl_t classic;
        struct guitar_hero_3_t gh3;
    };
} expansion_t;


Where all the structures in the union are of a different size.

Now, I know that pyrex can't nest ctypedefs, but is it possible to convert
this code to pyrex, so
that I can refer to both exp.type and exp.gh3, if object is an expansion_t?

J. Mickelin

_______________________________________________
Pyrex mailing list
[email protected]
http://lists.copyleft.no/mailman/listinfo/pyrex