LUAL_GETMETAFIELD(3) | Library Functions Manual | LUAL_GETMETAFIELD(3) |
luaL_getmetafield
—
pushes onto the stack the field from the metatable of the
object at the specified index, function indicator [-0, + (0|1),
m]
#include
<lauxlib.h>
int
luaL_getmetafield
(lua_State
*L, int obj,
const char *e);
luaL_getmetafield
()
pushes onto the stack the field e from the metatable
of the object at index obj. If the object does not
have a metatable, or if the metatable does not have this field, returns 0
and pushes nothing.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The luaL_getmetafield
() manual page is
based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 24, 2022 | Debian |