| 243 | } |
| 244 | |
| 245 | static int argcheck(lua_State *L, int cond, int idx, const char *fmt, ...) { |
| 246 | if (!cond) { |
| 247 | va_list l; |
| 248 | va_start(l, fmt); |
| 249 | lua_pushvfstring(L, fmt, l); |
| 250 | va_end(l); |
| 251 | return luaL_argerror(L, idx, lua_tostring(L, -1)); |
| 252 | } |
| 253 | return 1; |
| 254 | } |
| 255 | |
| 256 | static pb_Slice lpb_toslice(lua_State *L, int idx) { |
| 257 | int type = lua_type(L, idx); |
no test coverage detected