tolua limitation!!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tolua limitation!!

Supratik Champati
When I try to use tolua on something like

typedef struct vec_
{
    double coord[3];
} vector;

I get a parse error on double coord[3].
I tried a whole bunch of things with the source code
to no avail and finally gave up. Can somebody please
help me out with this ?

Thanks in advance. 

-- 
supratik

Reply | Threaded
Open this post in threaded view
|

Re: tolua limitation!!

Waldemar Celes-3

> When I try to use tolua on something like
>
> typedef struct vec_
> {
>     double coord[3];
> } vector;
>
> I get a parse error on double coord[3].

try:

struct vector
{
  double coord[3];
};

although using C++ syntax, tolua binds this code as a C typedef.
I will fix this limitation in the next version.

-- waldemar


Reply | Threaded
Open this post in threaded view
|

Re: tolua limitation!!

Supratik Champati
Thanks for your response.

I tried what you suggested and get the same error.

struct vector
 {
   double coord[3];
 };

Error Message generated -
** tolua: parse error.

Code being processed:
double coord[3];

I am using the latest version 3.0 beta.
I have compiled on IRIX6.3 and HPUX-10.2.

Thanx.



Waldemar Celes wrote:
> 
> > When I try to use tolua on something like
> >
> > typedef struct vec_
> > {
> >     double coord[3];
> > } vector;
> >
> > I get a parse error on double coord[3].
> 
> try:
> 
> struct vector
> {
>   double coord[3];
> };
> 
> although using C++ syntax, tolua binds this code as a C typedef.
> I will fix this limitation in the next version.
> 
> -- waldemar