Function setfield

Source
pub unsafe extern "C" fn setfield(
    state: lua_State,
    index: i32,
    str: *const u8,
)
Expand description

Does the equivalent to t[k] = v, where t is the value at the given valid index and v is the value at the top of the stack.

This function pops the value from the stack. As in Lua, this function may trigger a metamethod for the “newindex” event (see §2.8).