Skip to main content

copy

Function copy 

Source
pub fn copy(state: &mut LuaState, fromidx: i32, toidx: i32)
Expand description

C’s lua_copy: copy the value at fromidx into toidx (a stack slot or a function-upvalue pseudo-index). Copying to LUA_REGISTRYINDEX is intentionally a no-op — C would replace the whole l_registry table, a footgun no real embedder uses (issue #278).