| 112 | |
| 113 | |
| 114 | static int luaB_getmetatable (lua_State *L) { |
| 115 | luaL_checkany(L, 1); |
| 116 | if (!lua_getmetatable(L, 1)) { |
| 117 | lua_pushnil(L); |
| 118 | return 1; /* no metatable */ |
| 119 | } |
| 120 | luaL_getmetafield(L, 1, "__metatable"); |
| 121 | return 1; /* returns either __metatable field (if present) or metatable */ |
| 122 | } |
| 123 | |
| 124 | |
| 125 | static int luaB_setmetatable (lua_State *L) { |
nothing calls this directly
no test coverage detected