| 10955 | |
| 10956 | |
| 10957 | static int luaB_getmetatable (lua_State *L) { |
| 10958 | luaL_checkany(L, 1); |
| 10959 | if (!lua_getmetatable(L, 1)) { |
| 10960 | lua_pushnil(L); |
| 10961 | return 1; /* no metatable */ |
| 10962 | } |
| 10963 | luaL_getmetafield(L, 1, "__metatable"); |
| 10964 | return 1; /* returns either __metatable field (if present) or metatable */ |
| 10965 | } |
| 10966 | |
| 10967 | |
| 10968 | static int luaB_setmetatable (lua_State *L) { |
nothing calls this directly
no test coverage detected