Difference between revisions of "Getmetatable"

From OpenEUO
Jump to: navigation, search
(Created page with " getmetatable(object) If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, ...")
 
Line 2: Line 2:
  
 
If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.
 
If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.
 +
 +
[http://www.lua.org/manual/5.1/manual.html#2.8 Lua Manual - Metatables]

Revision as of 17:02, 7 October 2010

getmetatable(object)

If object does not have a metatable, returns nil. Otherwise, if the object's metatable has a "__metatable" field, returns the associated value. Otherwise, returns the metatable of the given object.

Lua Manual - Metatables