[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Getting the name of a function
- From: "Björklund, Peter" <Peter.Bjorklund@...>
- Date: Fri, 1 Feb 2002 16:11:14 +0100
How can I do the following:
lua_register( L, "aFunction", func );
lua_register( L, "anotherFunction", func );
lua_register( L, "aThirdFunction", func );
static int func (lua_State *L)
{
// How do I check which function that was actually called?
}
... I also want to know how to "trap" those tags (or what they are called).
So I can do this in Lua:
func[ "aFunction" ] = 3
func[ "anotherFunction" ] = 8
func[ "aThirdFunction" ] = 1
Please help me out!
/Peter Bjorklund