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

Function argcheck

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

Source from the content-addressed store, hash-verified

243}
244
245static 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
256static pb_Slice lpb_toslice(lua_State *L, int idx) {
257 int type = lua_type(L, idx);

Callers 14

lpb_addtypeFunction · 0.85
lpb_packfmtFunction · 0.85
lpb_unpackscalarFunction · 0.85
lpb_unpacklocFunction · 0.85
lpb_unpackfmtFunction · 0.85
check_lsliceFunction · 0.85
Lslice_enterFunction · 0.85
Lslice_leaveFunction · 0.85
lpb_checktableFunction · 0.85
lpbE_enumFunction · 0.85
lpbE_fieldFunction · 0.85
Lpb_encodeFunction · 0.85

Calls 2

lua_pushvfstringFunction · 0.85
luaL_argerrorFunction · 0.85

Tested by

no test coverage detected