[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] tolua++ 1.0.5 and lua_qt 0.0.1a
- From: Herbert Leuwer <herbert.leuwer@...>
- Date: Tue, 12 Apr 2005 18:49:28 +0200
The possibility to wrap unions with tolua is a great advantage, thanks.
However, I recognised the following problem.
The following works find when only using structs:
struct a {
...
};
struct A {
struct a x;
...
};
It does not work for unions (parser error).
/* Kind A - not working */
struct a {
...
};
union A {
struct a x;
...
};
fails.
I have to put struct a first into a typedef which can then be
successfully used inside the
union, e.g.
...
/* Kind B - works */
typedef struct a a;
union A {
a x;
...
};
The need for the typedef is ugly, because it prohibits a very common
practice in C.
Is it a big issue to change the parser such that it accepts kind A
definitions ?
Thanks
Herbert