lua_clonefunction

Function lua_clonefunction 

Source
pub unsafe extern "C-unwind" fn lua_clonefunction(
    L: *mut lua_State,
    idx: c_int,
)
Expand description

Clones the function at the given index and pushes it onto the stack.

The function must be a Luau function, it cannot be a C function. All of the function’s upvalues will be copied (they reference the same upvalues). The function will have the environment of the current thread.