Change the substream implementation in pb_decode.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Fri, 24 Aug 2012 16:35:17 +0000 (19:35 +0300)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Fri, 24 Aug 2012 16:35:17 +0000 (19:35 +0300)
commitdc2da0edc568b29361479fb7405c96b1a13442cf
treeeb7a4143f25bb3f90686f6f8f34a2377e86be7f3
parent86257a2a7000875c8ec1e2eef59de258400ac724
Change the substream implementation in pb_decode.

This makes it unnecessary to copy back the state, and also relaxes
the requirements on callbacks (bytes_left will always be valid).
It decreases code size by a few bytes, but may be just slightly slower.
pb_decode.c
pb_decode.h