| 126 | |
| 127 | |
| 128 | static int luaB_getmetatable (lua_State *L) { |
| 129 | luaL_checkany(L, 1); |
| 130 | if (!lua_getmetatable(L, 1)) { |
| 131 | lua_pushnil(L); |
| 132 | return 1; /* no metatable */ |
| 133 | } |
| 134 | luaL_getmetafield(L, 1, "__metatable"); |
| 135 | return 1; /* returns either __metatable field (if present) or metatable */ |
| 136 | } |
| 137 | |
| 138 | |
| 139 | static int luaB_setmetatable (lua_State *L) { |
nothing calls this directly
no test coverage detected