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

Function luaB_getmetatable

third-party/lua-5.2.4/src/lbaselib.c:101–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101static int luaB_getmetatable (lua_State *L) {
102 luaL_checkany(L, 1);
103 if (!lua_getmetatable(L, 1)) {
104 lua_pushnil(L);
105 return 1; /* no metatable */
106 }
107 luaL_getmetafield(L, 1, "__metatable");
108 return 1; /* returns either __metatable field (if present) or metatable */
109}
110
111
112static 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