Check/enforce inheritance
| 147 | |
| 148 | // Check/enforce inheritance |
| 149 | static void add_to_group(lua_State *L, |
| 150 | const char *metatablename, |
| 151 | const char *groupname) { |
| 152 | luaL_getmetatable(L, metatablename); // mt |
| 153 | lua_pushstring(L, groupname); // mt, "name" |
| 154 | lua_pushboolean(L, 1); // mt, "name", true |
| 155 | lua_rawset(L, -3); // mt |
| 156 | lua_pop(L, 1); |
| 157 | } |
| 158 | |
| 159 | static void set_methods(lua_State *L, |
| 160 | const char *metatablename, |
no outgoing calls
no test coverage detected