aboutsummaryrefslogtreecommitdiffstats
path: root/pb_decode.h
AgeCommit message (Collapse)AuthorFilesLines
2013-10-29Remove the NANOPB_INTERNALS functions from public API.Petteri Aimonen1-19/+0
These have been deprecated since nanopb-0.1.6 (some since 0.1.3). Equivalent functions with better interface are available in the API. Update issue 91 Status: FixedInGit
2013-09-09Move the declarations of _pb_ostream_t and _pb_istream_t before first use.Petteri Aimonen1-33/+33
Otherwise Microsoft Visual C++ threats them as C++ classes instead of plain structs, forbidding use in C linkage functions. Thanks to Markus Schwarzenberg for the patch. Update issue 84 Status: Started
2013-07-06Add pb_decode_delimited and pb_encode_delimited wrapper functions.Petteri Aimonen1-0/+6
Update issue 74 Status: FixedInGit
2013-07-06Clean up the comments in pb_encode.h and pb_decode.hPetteri Aimonen1-38/+68
2013-04-08No need to include stdbool.h separatelydch1-1/+0
2013-02-06Add compile-time option PB_BUFFER_ONLY.Petteri Aimonen1-0/+9
This allows slight optimizations if only memory buffer support (as opposed to stream callbacks) is wanted. On ARM difference is -12% execution time, -4% code size when enabled.
2012-10-29Add extern "C" to header files.Petteri Aimonen1-0/+8
Update issue 35 Status: FixedInGit
2012-10-18Remove the "buf = NULL" => skip requirement from pb_istream_t callbacks.Petteri Aimonen1-4/+2
Rationale: it's easy to implement the callback wrong. Doing so introduces io errors when unknown fields are present in the input. If code is not tested with unknown fields, these bugs can remain hidden for long time. Added a special case for the memory buffer stream, where it gives a small speed benefit. Added testcase for skipping fields with test_decode2 implementation. Update issue 37 Status: FixedInGit
2012-08-26Add pb_decode_noinit and use it from pb_dec_submessage.Petteri Aimonen1-0/+6
This avoids double initialization when decoding nested submessages. Fixes an issue with submessage arrays that was present in previous version of this patch. Update issue 28 Status: FixedInGit
2012-08-26Revert "Add pb_decode_noinit and use it from pb_dec_submessage."Petteri Aimonen1-6/+0
The patch breaks default values inside submessage arrays (I think). Have to add test cases and check back. This reverts commit f1d7640fe1be0f150f604c72108ea516222c2505.
2012-08-26Add pb_decode_noinit and use it from pb_dec_submessage.Petteri Aimonen1-0/+6
This avoids double initialization when decoding nested submessages. Update issue 28 Status: FixedInGit
2012-08-24Implement error messages in the decoder side.Petteri Aimonen1-0/+4
Update issue 7 Status: Started
2012-08-24Revert "Change the substream implementation in pb_decode."Petteri Aimonen1-0/+5
This reverts commit dc2da0edc568b29361479fb7405c96b1a13442cf. Add pb_close_string_substream() for copying back the state. This makes adding error messages easier in the future, as also them need to be propagated back from the substream.
2012-08-24Reorganize the field decoder interface.Petteri Aimonen1-6/+28
This makes the field decoding functions more intuitive to use. The old interface is still present if you specify NANOPB_INTERNALS. Update issue 2 Status: FixedInGit
2012-08-24Change the substream implementation in pb_decode.Petteri Aimonen1-4/+0
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.
2012-08-24Fix a confusing statement in a comment.Petteri Aimonen1-1/+1
2012-07-18Fix an unsigned vs. signed warning on some compiler.Petteri Aimonen1-1/+1
2012-06-16Added new functions to public interface in pb_decode.h.Petteri Aimonen1-0/+3
pb_decode_tag and pb_skip_field allow manually iterating the fields in a message.
2011-09-13Fixed a bunch of bugs related to callback fields.Petteri Aimonen1-1/+2
Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults. Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface a bit easier to use, and in addition runs faster. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14More documentation, small improvementsPetteri Aimonen1-2/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen1-14/+22
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-28git-svn-id: https://svn.kapsi.fi/jpa/nanopb@947 ↵Petteri Aimonen1-12/+4
e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Making code ansi-compatiblePetteri Aimonen1-15/+34
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@944 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Improvements, array supportPetteri Aimonen1-12/+9
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@943 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-25First version of decodingPetteri Aimonen1-0/+55
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@942 e3a754e5-d11d-0410-8d38-ebb782a927b9