MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaB_getmetatable

Function luaB_getmetatable

src/Chain/libraries/glua/lbaselib.cpp:226–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226static int luaB_getmetatable(lua_State *L) {
227 luaL_checkany(L, 1);
228 if (!lua_getmetatable(L, 1)) {
229 lua_pushnil(L);
230 return 1; /* no metatable */
231 }
232 luaL_getmetafield(L, 1, "__metatable");
233 return 1; /* returns either __metatable field (if present) or metatable */
234}
235
236
237static 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