| 1890 | } |
| 1891 | |
| 1892 | static 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 | |
| 1906 | static int Lpb_decode(lua_State *L) { |
| 1907 | return lpbD_decode(L, lua_isnoneornil(L, 2) ? |
no test coverage detected