MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaB_getmetatable

Function luaB_getmetatable

Source/Misc/lua/src/lua.c:10957–10965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10955
10956
10957static int luaB_getmetatable (lua_State *L) {
10958luaL_checkany(L, 1);
10959if (!lua_getmetatable(L, 1)) {
10960lua_pushnil(L);
10961return 1; /* no metatable */
10962}
10963luaL_getmetafield(L, 1, "__metatable");
10964return 1; /* returns either __metatable field (if present) or metatable */
10965}
10966
10967
10968static 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