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

Function lpbD_decode

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

Source from the content-addressed store, hash-verified

1890}
1891
1892static int lpbD_decode(lua_State *L, pb_Slice s, int start) {
1893 lpb_State *LS = lpb_lstate(L);
1894 const pb_Type *t = lpb_type(LS, lpb_checkslice(L, 1));
1895 lpb_Env e;
1896 argcheck(L, t!=NULL, 1, "type '%s' does not exists", lua_tostring(L, 1));
1897 lua_settop(L, start);
1898 if (!lua_istable(L, start)) {
1899 lua_pop(L, 1);
1900 lpb_pushtypetable(L, LS, t);
1901 }
1902 e.L = L, e.LS = LS, e.s = &s;
1903 return lpbD_message(&e, t);
1904}
1905
1906static int Lpb_decode(lua_State *L) {
1907 return lpbD_decode(L, lua_isnoneornil(L, 2) ?

Callers 2

Lpb_decodeFunction · 0.85
Lpb_decode_unsafeFunction · 0.85

Calls 7

lpb_lstateFunction · 0.85
lpb_typeFunction · 0.85
lpb_checksliceFunction · 0.85
argcheckFunction · 0.85
lua_settopFunction · 0.85
lpb_pushtypetableFunction · 0.85
lpbD_messageFunction · 0.85

Tested by

no test coverage detected