|
I myself wrote:
[..] int Foo(void) { printf("Am I Foo() or Moo( ?)"); } void Register(void) { lua_Register(LuaState, Foo, "Foo"); lua_Register(LuaState, Foo, "Moo"); }
Hey, it's still on the stack int Foo(void) { // Get name under which function was called const char *pszName = lua_tostring(pLuaState, +1); //// printf("I'm %s", pszName); } Right ? Is it safe to do that ? -Markus-