summaryrefslogtreecommitdiffstats
path: root/pb_decode.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-26Fix warnings with -Wcast-qual. Add test for C++ compile.Petteri Aimonen1-1/+8
Update issue 27 Status: FixedInGit
2012-08-26Add pb_decode_noinit and use it from pb_dec_submessage.Petteri Aimonen1-4/+8
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-8/+4
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-4/+8
This avoids double initialization when decoding nested submessages. Update issue 28 Status: FixedInGit
2012-08-24Implement error messages in the decoder side.Petteri Aimonen1-15/+15
Update issue 7 Status: Started
2012-08-24Revert "Change the substream implementation in pb_decode."Petteri Aimonen1-13/+20
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-55/+82
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-16/+13
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-16Fix casting issuesStan Hu1-2/+2
2012-08-09Declare warn_unused_result only on GCC >= 3.4.0.Petteri Aimonen1-5/+5
Thanks to cea.max.simoes for bug report & fix. Update issue 25 Status: FixedInGit
2012-07-31Fix bug in decoder with packed arrays.Petteri Aimonen1-1/+4
Update issue 23 Status: FixedInGit
2012-07-19Additional unsigned vs. signed fix for tagPetteri Aimonen1-1/+1
2012-07-18Fix an unsigned vs. signed warning on some compiler.Petteri Aimonen1-2/+2
2012-07-18Fixed a few compiler warnings, added check.Petteri Aimonen1-1/+1
Main code is now compiled (for tests) with -pedantic -Wextra. The test programs are not as strictly bound, but this should improve the chances that atleast the core library compiles with most compilers without warnings.
2012-06-30Improve the detection of missing required fields.Petteri Aimonen1-15/+25
Now the limit of tracked fields is configurable at compile-time using PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation. Fixes issue #18.
2012-06-16Added new functions to public interface in pb_decode.h.Petteri Aimonen1-18/+34
pb_decode_tag and pb_skip_field allow manually iterating the fields in a message.
2012-06-13Fix non-constant initializer errors with some compilers.Petteri Aimonen1-5/+14
Fixes issue #13. Thanks to Kevin Worth for reporting.
2012-04-18Fixing compiler warnings, mostly related to unused parameters.Petteri Aimonen1-2/+5
Thanks to David Hotham for the patch. Fixes issue 8.
2012-01-12Fixed issue 1 reported by Erik Rosen:Petteri Aimonen1-1/+3
The size of non-callback bytes-fields was miscalculated, which caused all following fields in a message to contain garbage. Previous commit contains a testcase for this. This fix changes the generated message description. If your protocol uses bytes-fields, you should regenerate *.pb.c.
2011-11-30Merged 0005-Handle-endianness-correctly.patch by Matt Kern.Petteri Aimonen1-5/+9
On big endian machines, pb_dec_fixed32 and pb_dec_fixed64 were incorrectly overwriting the result value even if reading failed. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1022 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-10Fix some compiler warnings in strict C89 modePetteri Aimonen1-5/+6
Contributed by Michael Poole. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1004 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-13Fixed a bunch of bugs related to callback fields.Petteri Aimonen1-22/+63
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-23more unittestsPetteri Aimonen1-6/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@964 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23check return valuesPetteri Aimonen1-19/+27
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@961 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23More unittestsPetteri Aimonen1-2/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@960 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22unittests, change to PB_LTYPE_BYTES data sizePetteri Aimonen1-4/+2
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17ExamplePetteri Aimonen1-7/+26
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14More documentation, small improvementsPetteri Aimonen1-8/+13
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-11Documenting and improving stream behaviourPetteri Aimonen1-1/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen1-29/+28
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-30unittests (some)Petteri Aimonen1-3/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-28iterPetteri Aimonen1-48/+103
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@948 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-28git-svn-id: https://svn.kapsi.fi/jpa/nanopb@947 ↵Petteri Aimonen1-89/+36
e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27bugfixPetteri Aimonen1-2/+2
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@946 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Making code ansi-compatiblePetteri Aimonen1-53/+75
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@944 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Improvements, array supportPetteri Aimonen1-106/+281
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@943 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-25First version of decodingPetteri Aimonen1-0/+274
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@942 e3a754e5-d11d-0410-8d38-ebb782a927b9