| 224 | { if (pb_addlength(b, len) == 0) luaL_error(L, "encode bytes fail"); } |
| 225 | |
| 226 | static int typeerror(lua_State *L, int idx, const char *type) { |
| 227 | lua_pushfstring(L, "%s expected, got %s", type, luaL_typename(L, idx)); |
| 228 | return luaL_argerror(L, idx, lua_tostring(L, -1)); |
| 229 | } |
| 230 | |
| 231 | static lua_Integer posrelat(lua_Integer pos, size_t len) { |
| 232 | if (pos >= 0) return pos; |
no test coverage detected