| 1925 | } |
| 1926 | |
| 1927 | static int lpb_unpackfield(lpb_Env *e, const pb_Field* f, uint32_t tag, int last) { |
| 1928 | if (!f) { |
| 1929 | pb_skipvalue(e->s, tag); |
| 1930 | return 0; |
| 1931 | } |
| 1932 | if (f->type && f->type->is_map) { |
| 1933 | lpbD_checktype(e, f, tag); |
| 1934 | if (!last) lua_newtable(e->L); |
| 1935 | lpbD_map(e, f); |
| 1936 | } |
| 1937 | else if (f->repeated) { |
| 1938 | if (!last) lua_newtable(e->L); |
| 1939 | lpbD_repeated(e, f, tag); |
| 1940 | } |
| 1941 | else { |
| 1942 | lpbD_field(e, f, tag); |
| 1943 | } |
| 1944 | return f->sort_index; |
| 1945 | } |
| 1946 | |
| 1947 | static int lpbD_unpack(lpb_Env* e, const pb_Type* t) { |
| 1948 | lua_State* L = e->L; |
no test coverage detected