LUA_SETMETATABLE(3) Library Functions Manual LUA_SETMETATABLE(3)

lua_setmetatablepops a table from the stack and sets it as the new metatable for the value, function indicator [-1, +0, -]

#include <lua.h>

int
lua_setmetatable(lua_State *L, int index);

() pops a table from the stack and sets it as the new metatable for the value at the given acceptable index.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_setmetatable() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 15, 2022 Debian