Aliases

  • getprotos

Arguments

function | number
required
The function to inspect, or a positive stack level identifying a caller.
boolean
default:"false"
Select the active prototype mode. The behavior differs between getproto and getprotos.

Returns

{any}
A 1-based prototype list: lightuserdata by default, constructed closures in active mode.
false returns lightuserdata prototype pointers, not callable functions. true constructs new Lua closures; unlike getproto(true), it does not search for existing live closures. Captured values may be uninitialized. Related types: Debug types & behavior.

Example