Difference between revisions of "Setmetatable"

From OpenEUO
Jump to: navigation, search
(Created page with " setmetatable (table, metatable) Sets the metatable for the given table. (You cannot change the metatable of other types from Lua, only from C.) If metatable is nil, removes the...")
 
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  
 
This function returns table.
 
This function returns table.
 +
 +
[[Getmetatable]]
 +
 +
[[Rawequal]]
 +
 +
[[Rawget]]
 +
 +
[[Rawset]]
 +
 +
[http://www.lua.org/manual/5.1/manual.html#2.8 Lua Manual - Metatables]

Latest revision as of 10:16, 9 October 2010

setmetatable (table, metatable)

Sets the metatable for the given table. (You cannot change the metatable of other types from Lua, only from C.) If metatable is nil, removes the metatable of the given table. If the original metatable has a "__metatable" field, raises an error.

This function returns table.

Getmetatable

Rawequal

Rawget

Rawset

Lua Manual - Metatables