pub fn lua_getlocal(l: LuaState, ar: *mut LuaDebug, n: c_int) -> LuaString
Expand description
Gets information about a local variable of a given activation record. The parameter ar must be a valid activation record that was filled by a previous call to lua_getstack or given as argument to a hook (see lua_Hook). The index n selects which local variable to inspect (1 is the first parameter or active local variable, and so on, until the last active local variable). lua_getlocal pushes the variable’s value onto the stack and returns its name.
§Returns
Returns NULL (and pushes nothing) when the index is greater than the number of active local variables.