[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: function name
- From: "Brett Bibby" <research@...>
- Date: Fri, 5 Mar 2004 10:55:41 +0800
Thanks for your note. I read the debug stuff before posting but assumed it wasn't meant for runtime use. I guess I should be more specific. I need to retrieve a few thousand functions names per second. Under the debug section it says "The lua_getinfo function checks how the function was called or whether it is the value of a global variable to find a suitable name. If it cannot find a name, then name is set to NULL." So if I have:
-- some code here
And my C host has...
int SetSomeValueInTheCHost(lua_State *luaStatePtr)
// the first value on the lua stack is a function, how can I get the name fast here?
// candidates include getfuncname or getobjname?
With the decalration as per above, would getfuncname or getobjname retrieve anything useful? Is there a better/faster way?
----- Original Message -----
From: "Ashwin Hirschi" <firstname.lastname@example.org>
To: "Lua list" <email@example.com>
Sent: Friday, March 05, 2004 10:16 AM
Subject: Re: function name
> > Is there anyway to get, find or resolve the string name of a function on the stack?
> Have a look at Lua's "debug interface":
> no signature is a signature