|
On 5-Sep-05, at 8:43 PM, Edwin Eyan Moragas wrote:
how can i determine the number of parameters this function needs?
The simple answer is: it doesn't need any :) since Lua will just fill in the missing ones with nil.
A better question would be "how can i determine the maximum number of arguments this function will care about?". But I don't believe there is a way of doing that.
If you really want to associate functions with introspection information, I think you'd have to create some mechanism to do it, like a weak-keyed table of functions whose values are the function signature.