Function lua_upvalueindex

Source
pub fn lua_upvalueindex(i: c_int) -> c_int
Expand description

Produces the pseudo-indicies for upvalues of C functions.

A C function that captures upvalues can get a pseudo-index for each upvalue using this function. The first upvalue is at lua_upvalueindex(1), and the n-th upvalue is at lua_upvalueindex(n).

This function will produce an acceptable but invalid pseudo-index for any input.