pub fn lua_setupvalue(l: LuaState, fidx: c_int, idx: c_int) -> LuaStringExpand description
Sets the value of a closure’s upvalue. Parameters funcindex and n are as in lua_getupvalue (see lua_getupvalue). It assigns the value at the top of the stack to the upvalue and returns its name. It also pops the value from the stack.