| 91 | |
| 92 | |
| 93 | static int luaB_getmetatable (lua_State *L) { |
| 94 | luaL_checkany(L, 1); |
| 95 | if (!lua_getmetatable(L, 1)) { |
| 96 | lua_pushnil(L); |
| 97 | return 1; /* no metatable */ |
| 98 | } |
| 99 | luaL_getmetafield(L, 1, "__metatable"); |
| 100 | return 1; /* returns either __metatable field (if present) or metatable */ |
| 101 | } |
| 102 | |
| 103 | |
| 104 | static int luaB_setmetatable (lua_State *L) { |
nothing calls this directly
no test coverage detected