index — that is, a function defined inside
target. Child prototypes are numbered in the order the compiler emitted
them, starting at 1.
Every function on this page is reachable both as
debug.<name> and as a
plain global of the same name, so debug.getupvalues(f) and getupvalues(f)
are the same call.Parameters
function | number
required
The function to inspect, or a stack level. Level
1 is your caller.number
required
Which child prototype to take,
1 or greater.boolean
default:"false"
When
false you get a single callable handle for the prototype. When true
you get a table of the live closures in the heap that are currently using
that prototype.Returns
function | table
A callable handle, or with
activated an array of live closures.Behavior
- The two modes return different types. Without
activatedthe result is a function; with it the result is a table, which may be empty if no closure for that prototype is currently alive. - The handle is a stand-in. The non-activated form hands back a closure built over the prototype so you can read its constants and info. It is not the same object as a closure the game created.
- Athena’s own closures are excluded from the activated list.