getmetatable

Returns the metatable for the object

Prototype

t = getmetatable (obj)

Description

Returns metatable for the nominated object, which can be:

getmetatable (_G) --> nil
In Lua 5.1, all objects can have metatables (not just tables).

Lua functions

Topics