lua_getupvalue
[-0, +(0|1), –]
const char *lua_getupvalue (lua_State *L, int funcindex, int n);
Gets information about the n
-th upvalue of the closure at index funcindex
. It pushes the upvalue's value onto the stack and returns its name. Returns NULL
(and pushes nothing) when the index n
is greater than the number of upvalues.
For C functions, this function uses the empty string ""
as a name for all upvalues. (For Lua functions, upvalues are the external local variables that the function uses, and that are consequently included in its closure.)
Upvalues have no particular order, as they are active through the whole function. They are numbered in an arbitrary order.
Please login to continue.