| 1971 | } |
| 1972 | |
| 1973 | static int Lpb_unpack(lua_State* L) { |
| 1974 | lpb_State* LS = lpb_lstate(L); |
| 1975 | const pb_Type* t = lpb_type(LS, lpb_checkslice(L, 1)); |
| 1976 | pb_Slice s = lpb_checkslice(L, 2); |
| 1977 | lpb_Env e; |
| 1978 | e.L = L, e.LS = LS, e.s = &s; |
| 1979 | argcheck(L, t != NULL, 1, "type '%s' does not exists", lua_tostring(L, 1)); |
| 1980 | return lpbD_unpack(&e, t); |
| 1981 | } |
| 1982 | |
| 1983 | /* pb module interface */ |
| 1984 |
nothing calls this directly
no test coverage detected