I have these functions in inventory:
Code: Select all
AddItem(int number)
AddItem(char *name)
I am pretty sure that this situation isn't restricted to toLua++. Or maybe it is, but I'm boned nonetheless. When you pass it a 3, it considers that also a valid Lua string. Which is okay, but it appears that toLua++ doesn't handle that. There should be a way to specify a priority or something. Like if the function signature with "int" works, go with it, otherwise go to "string." An int is a valid int and string, but a string is not a valid integer. But I don't see any way that toLua++ would let you do this.
How does LuaBind/SWIG/whatever wrapper generator you guys are using handle this shitty scenario?