MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaB_getmetatable

Function luaB_getmetatable

extlibs/lua/src/lbaselib.c:126–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

luaL_checkanyFunction · 0.85
lua_getmetatableFunction · 0.85
lua_pushnilFunction · 0.85
luaL_getmetafieldFunction · 0.85

Tested by

no test coverage detected