MCPcopy Create free account
hub / github.com/Tencent/UnLua / typeerror

Function typeerror

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.cpp:226–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224{ if (pb_addlength(b, len) == 0) luaL_error(L, "encode bytes fail"); }
225
226static 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
231static lua_Integer posrelat(lua_Integer pos, size_t len) {
232 if (pos >= 0) return pos;

Callers 6

lpb_checksliceFunction · 0.85
lpb_checkintegerFunction · 0.85
Lpb_hookFunction · 0.85
Lpb_encode_hookFunction · 0.85
Lpb_decode_unsafeFunction · 0.85
Lpb_slice_unsafeFunction · 0.85

Calls 2

lua_pushfstringFunction · 0.85
luaL_argerrorFunction · 0.85

Tested by

no test coverage detected