| 224 | } |
| 225 | |
| 226 | static 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 | |
| 237 | static int luaB_setmetatable(lua_State *L) { |
nothing calls this directly
no test coverage detected