| 81 | |
| 82 | |
| 83 | static 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 | |
| 94 | static int luaB_setmetatable (lua_State *L) { |
nothing calls this directly
no test coverage detected