[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: toLua 5 errors/questions
- From: "Nick Trout" <nick@...>
- Date: Wed, 10 Sep 2003 11:06:17 -0700
> I've posted this a month ago, but got no answer. Since I couldn't find
> any in the meantime, I really would appreciate any help on these
issues.
>
> I'm having some difficulties with the new version of toLua.
I'm also having some problems, which I think are different to your
problems. Mine relate to function overloading and renaming. I posted a
mail to Waldemar a week or so ago and haven't heard anything.
If you overload functions, e.g. in a .pkg
void foo2 @ foo (int x, int y);
void foo3 @ foo (int x, int y, int z);
You should be able to call foo(x,y) or foo(x,y,z) from Lua and toLua
tries each of the above overloads to find one that fits. However the
binding generation code generates the delegation call from the name of
the current function, not from the original function name. This is to a
none existent function and the code doesn't compile. (See
http://doris.sf.net CVS for details)
I suppose this is a little inefficient and it may be better to not use
renaming, however this worked under toLua4a.
Regards,
Nick