luaUpvalueIndex function

int luaUpvalueIndex(
  1. int i
)

Returns the pseudo-index for an upvalue at the given index (1-based). Use this in Dart closures to access upvalues pushed before the closure.

Implementation

int luaUpvalueIndex(int i) => luaRegistryIndex - i;