debug.setmetatable

Sets the metatable for an object

Prototype

object = debug.setmetatable (object, table)

Description

Sets the metatable for the given object to the given table (which can be nil).

Bypasses the check for the "__metatable" entry.

Returns the object.

Lua functions

Topics