LUAL_GETMETATABLE(3) Library Functions Manual LUAL_GETMETATABLE(3)

luaL_getmetatable — pushes onto the stack the metatable associated with name in the registry

#include <lauxlib.h>

void
luaL_getmetatable(lua_State *L, const char *tname);

Function indicator: [-0, +1, -].

() pushes onto the stack the metatable associated with name tname in the registry (see luaL_newmetatable(3)).

It is defined as the following macro:

(lua_getfield(L, LUA_REGISTRYINDEX, (tname)))

luaL_newmetatable(3)

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

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

July 24, 2022 Debian