lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>From steve@inquisit.com Mon May 18 14:42:03 1998

>Can that info be gotten for functions that are not on the Lua stack
>at the time?

you mean, with lua_getlocal? i'm not sure.
looking at the code in lapi.c, I see that lua_getlocal calls
lua_currentline(func), so you need to have the function running.

>Could you post some sample code of how to get the number and names of the
>parameters for a given function?

like I said before, there is currently no official way to do this, ie.
using lua.h.
for code that uses inside information not in lua.h,
see PrintLocals() in luac/print.c.

--lhf