lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> -----Original Message-----
>Actually, although I have also encountered the problem you describe, I was
referring to this output from toLua:
MyEnumType tolua_var_1 = ((MyEnumType) tolua_getnumber(tolua_S,2,0));
needs to be:
MyEnumType tolua_var_1 = ((MyEnumType)(int)  tolua_getnumber(tolua_S,2,0));

Ah, I had exactly the same problem and fixed it as you describe :-) Could we
have this change in a well please. :-)

> >>2. MS VC++ doesn't like the way toLua handles bool values, so have to
> change
> foo = (bool) (tolua_getbool(..));
> to
> foo = (tolua_getbool(..) != 0);
>
> Yep - I would like this changed as well please.

I'm attaching my toLuaFrontend perl script (for reals this time - last time
I forgot to actually attach it). Let me know if you find it useful.

Ta, I dont really know Perl (and I dont really want to :-) but I'll have a
look

Cheers Eric,
Nick