Re:The Novelties of Lua 5.2 Roberto Ierusalimschy (pdf slide...
by zeen on Saturday December 31, 2011 @02:09PM
(#3411561)
You got it. Quoting from the 5.2 manual:
Because of the lexical scoping rules, local variables can
be freely accessed by functions defined inside their scope.
A local variable used by an inner function is called an
upvalue, or external local variable, inside the inner
function.
i.e., the external local variables the closure is closed on. And for C functions made available to Lua scripts: When a C function is created, it is possible to associate
some values with it, thus creating a C closure (see
lua_pushcclosure); these values are called upvalues and are
accessible to the function whenever it is called.
- http://www.lua.org/manual/5.2/manual.html
http://www.lua.org/pil/27.3.3.html
Essentially, they are unbound variables that have to be reachable from the function by some mechanism, making it a closure.
Apologies if I've misunderstood anything here.