MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaB_getmetatable

Function luaB_getmetatable

freebsd/contrib/openzfs/module/lua/lbaselib.c:83–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83static int luaB_getmetatable (lua_State *L) {
84 luaL_checkany(L, 1);
85 if (!lua_getmetatable(L, 1)) {
86 lua_pushnil(L);
87 return 1; /* no metatable */
88 }
89 luaL_getmetafield(L, 1, "__metatable");
90 return 1; /* returns either __metatable field (if present) or metatable */
91}
92
93
94static 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