aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-02-21Move STATIC_ASSERTs to .pb.c file.Petteri Aimonen1-22/+24
This way the .pb.h will remain cleaner and easier to read.
2013-02-20Separate PB_HTYPE to PB_ATYPE and PB_HTYPE.Petteri Aimonen3-122/+176
Also clean up the logic so that it is easier to implement more allocation types in the future. Update issue 53 Status: FixedInGit
2013-02-20Rename PB_HTYPE_ARRAY -> PB_HTYPE_REPEATED.Petteri Aimonen5-313/+103
This is a more logical name in parallel with PB_HTYPE_REQUIRED and PB_HTYPE_OPTIONAL. Warning: This breaks backwards-compatibility of generated .pb.c files. You will have to regenerate the files and recompile.
2013-02-17Reformat generated .pb.c files using macros.Petteri Aimonen2-87/+139
This has the following advantages: 1) Easier to modify pb_field_t encoding 2) Simpler generator logic 3) Tidier looking, easier to read .pb.c files Update issue 58 Status: FixedInGit
2013-02-11Add gitignore.Petteri Aimonen1-0/+39
This is a bit bloated gitignore file. Having binaries in a separate build directory would be cleaner, but I don't bother to make that change now.
2013-02-11Replace pb_type_t enum with #defines.Petteri Aimonen1-54/+54
See issue #57.
2013-02-11Set version to 0.2.0-devPetteri Aimonen2-2/+2
2013-02-07Update changelogPetteri Aimonen1-0/+11
2013-02-07Fix error message bugs with packed arrays.Petteri Aimonen1-3/+9
Error messages were not propagated correctly with PB_HTYPE_ARRAY. Error status (boolean return value) was correct. Update issue 56 Status: FixedInGit
2013-02-07Add check for sizeof(double) == 8.Petteri Aimonen1-0/+15
Update issue 54 Status: FixedInGit
2013-02-07Sanitize filenames before putting them in #ifndef.Petteri Aimonen3-2/+13
Update issue 50 Status: FixedInGit
2013-02-07Fix compiler warning on MSVC (issue #57)Petteri Aimonen1-1/+1
2013-02-06Use unsigned datatypes where appropriate.Petteri Aimonen1-9/+9
2013-02-06Improve the pb_decode_varint implementations.Petteri Aimonen1-18/+40
Results for ARM: -4% execution time, +1% code size
2013-02-06Avoid unnecessary looping in required fields check.Petteri Aimonen1-7/+26
Results for ARM: -6% execution time, -1% code size
2013-02-06Add compile-time option PB_BUFFER_ONLY.Petteri Aimonen6-3/+60
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.
2013-02-05Make pb_decode_varint32 a separate implementation.Petteri Aimonen1-4/+14
This avoids doing 64-bit arithmetic for 32-bit varint decodings. It does increase the code size somewhat. Results for ARM Cortex-M3: -10% execution time, +1% code size, -2% ram usage.
2013-02-05Performance improvement: replace memcpy with loop.Petteri Aimonen2-3/+9
In the pb_istream_from_buffer and pb_ostream_from_buffer, memcpy was used to transfer values to the buffer. For the common case of count = 1-10 bytes, a simple loop is faster.
2013-02-05Add Java package name to nanopb.proto.Petteri Aimonen1-0/+2
This fixes problems when interoperating with Java. Fix suggested by trepidacious: https://groups.google.com/forum/#!topic/nanopb/hZgrj6h9OnY
2013-01-29Add an example of handling doubles on AVR platform.Petteri Aimonen8-0/+320
2013-01-21Fix misleading comment (current generator sets LTYPE always).Petteri Aimonen1-2/+2
2013-01-16Oops, typoed #ifdef; again fixing previous commit.Petteri Aimonen1-1/+1
2013-01-16Put previous commit (issue 52) inside #ifndefPetteri Aimonen1-0/+3
2013-01-16Fix bug with error messages.Petteri Aimonen1-0/+1
Update issue 52 Status: FixedInGit
2013-01-14Add field type FT_IGNORE to generator.Petteri Aimonen4-3/+24
This allows ignoring fields that are unnecessary or too large for an embedded system using nanopb, while allowing them to remain in the .proto for other platforms. Update issue 51 Status: FixedInGit
2013-01-13Add a test for the backwards compatibility of generated files.Petteri Aimonen5-1/+814
It is not necessary to maintain full compatibility of generated files for all of eternity, but this test will warn us if there is a need to regenerate the files.
2013-01-10Add generator option for packed structs.Petteri Aimonen5-6/+31
Usage is: message Foo { option (nanopb_msgopt).packed_struct = true; ... } Valid also in file scope. Update issue 49 Status: FixedInGit
2013-01-10Cleanup: get rid of unnecessary spacesPetteri Aimonen1-6/+6
2012-12-13Setting version to 0.1.9-devPetteri Aimonen2-2/+2
2012-12-13Publishing nanopb-0.1.8Petteri Aimonen3-2/+8
2012-12-06Fix small error in field callback documentation.Petteri Aimonen1-1/+1
Update issue 44 Status: FixedInGit
2012-11-27Complete initialization of pb_istream_t.Jens Steinhauser1-0/+3
Because PB_RETURN_ERROR checks if the 'errmsg' member is NULL before assigning to it, error messages would get lost.
2012-11-16Use TESTS variable to define dependencies for run_unittestsSteffen Siering1-6/+11
2012-11-16Select compilation options based on $(CC) in tests/Makefile.Petteri Aimonen1-3/+11
Makes 'make CC=clang' work. Based on patch submitted by Steffen Siering. Update issue 40: Status: FixedInGit
2012-11-16Rename test_compiles.c to test_multiple_files.cPetteri Aimonen3-4/+6
2012-11-16Fix STATIC_ASSERT macro when using multiple .proto files.Steffen Siering5-5/+36
The __COUNTER__ macro (used for generating unique names) is at least supported by gcc, clang and Visual Studio. With this change test_compiles.c is compilable, since no more typedefs are redefined. Compilers/Preprocessors not supporting __COUNTER__ error's are still possible which are hopfully handled by the usage of __LINE__ in most sittuations. Added unit test for the problem.
2012-11-14Fix naming of nested Enums with short namesPetteri Aimonen3-3/+16
2012-11-14Fix naming of enums when long_names=false.Petteri Aimonen4-5/+26
Modify test case to check that options.pb.o compiles. Update issue 42 Status: FixedInGit Update issue 43 Status: FixedInGit
2012-11-11Fix changelogPetteri Aimonen1-1/+1
2012-11-11Setting version to 0.1.8-devPetteri Aimonen2-2/+2
2012-11-11Publishing nanopb-0.1.7Petteri Aimonen2-2/+2
2012-10-29Document new generator optionsPetteri Aimonen2-0/+24
2012-10-29Add nanopb version number to generated files.Petteri Aimonen3-1/+16
tools/set_version.sh is used to update the values. Update issue 36 Status: FixedInGit
2012-10-29Add extern "C" to header files.Petteri Aimonen3-1/+23
Update issue 35 Status: FixedInGit
2012-10-29Add option to use short names for enum values.Petteri Aimonen6-14/+58
Update issue 38 Status: FixedInGit
2012-10-29Allow defining field type in .proto.Petteri Aimonen5-8/+68
Update issue 30 Status: FixedInGit
2012-10-29Improve .proto options parsing.Petteri Aimonen6-22/+129
Options can now be defined on command line, file, message or in field scope. Update issue 12 Status: Started
2012-10-29Use optparse in nanopb_generator.pyPetteri Aimonen1-31/+85
2012-10-29Give names to generated structures to allow forward declaration.Petteri Aimonen2-4/+6
Update issue 39 Status: FixedInGit
2012-10-21Improve the person_with_extra_field test.Petteri Aimonen3-4/+1
Added a field after the extra field to verify it's also ok.