MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaB_getmetatable

Function luaB_getmetatable

third-party/lua-5.5.0/src/lbaselib.c:128–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127
128static int luaB_getmetatable (lua_State *L) {
129 luaL_checkany(L, 1);
130 if (!lua_getmetatable(L, 1)) {
131 lua_pushnil(L);
132 return 1; /* no metatable */
133 }
134 luaL_getmetafield(L, 1, "__metatable");
135 return 1; /* returns either __metatable field (if present) or metatable */
136}
137
138
139static int luaB_setmetatable (lua_State *L) {

Callers

nothing calls this directly

Calls 4

luaL_checkanyFunction · 0.70
lua_getmetatableFunction · 0.70
lua_pushnilFunction · 0.70
luaL_getmetafieldFunction · 0.70

Tested by

no test coverage detected