| 54 | } |
| 55 | |
| 56 | std::string check_string(lua_State *L, int idx) { |
| 57 | size_t len = 0; |
| 58 | const char *str = lua_tolstring(L, idx, &len); |
| 59 | if (!str) typerror(L, idx, "string"); |
| 60 | return std::string(str, len); |
| 61 | } |
| 62 | |
| 63 | long check_int(lua_State *L, int idx) { |
| 64 | auto v = lua_tointeger(L, idx); |
no test coverage detected