[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: function name
- From: "Kevin Baca" <lualist@...>
- Date: Fri, 5 Mar 2004 08:45:26 -0800
How about passing the name of the function instead?
> 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:
> function Foo()
> -- some code here
> And then...
> function Fooey()
> 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":
> > http://www.lua.org/manual/5.0/manual.html#4
> > Ashwin.
> > --
> > no signature is a signature