summaryrefslogtreecommitdiffstats
path: root/pb_encode.c
AgeCommit message (Collapse)AuthorFilesLines
2012-07-18Fixed a few compiler warnings, added check.Petteri Aimonen1-2/+2
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-07-05Apparently some compilers don't want to automatically cast size_t to uint64_t.Petteri Aimonen1-4/+4
2012-07-05Fix some typos in __BIG_ENDIAN__ codePetteri Aimonen1-2/+2
2012-06-13Fix non-constant initializer errors with some compilers.Petteri Aimonen1-3/+14
Fixes issue #13. Thanks to Kevin Worth for reporting.
2012-04-18Fixing compiler warnings, mostly related to unused parameters.Petteri Aimonen1-2/+6
Thanks to David Hotham for the patch. Fixes issue 8.
2012-03-01Refactoring the field encoder interface.Petteri Aimonen1-77/+93
Replaced the confusing pb_enc_* functions with new pb_encode_* functions that have a cleaner interface. Updated documentation. Got rid of the endian_copy stuff in pb_encode.c, instead using C casts to do it automatically. This makes the code safer and also reduces binary size by about 5%. Fixes Issue 6.
2011-12-30Fixed a bug related to submessage encoding into memory buffer.Petteri Aimonen1-0/+1
Stream state was not copied back from substream in pb_enc_submessage, which caused garbage output if the stream callback modified the state. Expanded tests to cover this problem. Thanks to Paweł Pery for debugging and reporting this problem. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1089 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-10Fix some compiler warnings in strict C89 modePetteri Aimonen1-3/+2
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-14/+30
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-1/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@966 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23Changed autogenerated file naming from foo.c to foo.pb.cPetteri Aimonen1-0/+7
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23check return valuesPetteri Aimonen1-16/+25
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@961 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17ExamplePetteri Aimonen1-2/+5
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14More documentation, small improvementsPetteri Aimonen1-1/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-11Documenting and improving stream behaviourPetteri Aimonen1-4/+22
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-10Unittests for encodePetteri Aimonen1-14/+19
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@952 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen1-0/+326
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9