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

Function luaB_getmetatable

source/extern/lua/lbaselib.c:114–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114static int luaB_getmetatable (lua_State *L) {
115 luaL_checkany(L, 1);
116 if (!lua_getmetatable(L, 1)) {
117 lua_pushnil(L);
118 return 1; /* no metatable */
119 }
120 luaL_getmetafield(L, 1, "__metatable");
121 return 1; /* returns either __metatable field (if present) or metatable */
122}
123
124
125static 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