| 45 | // Util |
| 46 | |
| 47 | static void throw_argerror(lua_State *L, int index, const char *expected) { |
| 48 | char msg[256]; |
| 49 | sprintf(msg, "%s expected, got %s", expected, luaL_typename(L, index)); |
| 50 | luaL_argerror(L, index, msg); |
| 51 | } |
| 52 | |
| 53 | static void *checkgroup(lua_State *L, int index, const char *groupname) { |
| 54 | if (!lua_getmetatable(L, index)) { |