lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> [...] (Is there a way to avoid that first upvalue?) [...]


  Any access to lua_upvalueindex(n), where n is greater than the number
  of upvalues of the current function (but not greater than 256, which
  is one plus the maximum number of upvalues in a closure), produces an
  acceptable but invalid index.


  For functions that can be called with acceptable indices, any
  non-valid index is treated as if it contains a value of a virtual type
  LUA_TNONE, [...]

-- Roberto