Petteri Aimonen
cd3af3272d
Rename some internal functions to have unique names
2013-10-29 15:32:51 +02:00
Petteri Aimonen
ed564186e1
Detect invalid sizes when encoding bytes fields.
2013-10-24 21:45:39 +03:00
Petteri Aimonen
86d6983156
Same fix for EncodedSize.__mul__
2013-10-24 09:52:40 +03:00
Petteri Aimonen
0848255d4a
Handle also longs in EncodedSize
2013-10-24 08:44:59 +03:00
Petteri Aimonen
51f0e47295
Fix the size of length prefix for messages in other files.
2013-10-23 21:21:43 +03:00
Petteri Aimonen
49bd3f35a0
Generate message size #defines also for messages defined in multiple files.
...
Add testcase for the same.
2013-10-23 21:01:11 +03:00
Petteri Aimonen
2bfd497eea
Define pb_size_t and pb_ssize_t data types.
...
Use these in pb_field_t definition to clean up some #ifs, and also
to prepare for solving issue #82 .
2013-10-20 21:49:55 +03:00
Petteri Aimonen
e83fbd18d3
Check array max size when encoding.
...
Update issue 90
Status: FixedInGit
2013-10-20 21:42:00 +03:00
Petteri Aimonen
388d4de833
Add #defines for the maximum encoded message size.
...
Update issue 89
Status: FixedInGit
2013-09-26 10:23:37 +03:00
Petteri Aimonen
2363af29a2
Setting version to 0.2.4-dev
2013-09-18 12:47:32 +03:00
Petteri Aimonen
283a8f36cb
Publishing nanopb-0.2.3
nanopb-0.2.3
2013-09-18 12:44:46 +03:00
Petteri Aimonen
8accc25710
Update changelog
2013-09-13 13:41:57 +03:00
Petteri Aimonen
73142ba082
Add a new very simple example
2013-09-13 13:35:25 +03:00
Petteri Aimonen
f47410ea4b
Move examples into subfolders, add READMEs
2013-09-13 12:59:31 +03:00
Petteri Aimonen
fd9a79a06d
Merge branch 'dev_get_rid_of_ternary_operator'
2013-09-13 11:31:45 +03:00
Petteri Aimonen
9ada7e7525
Fine-tune the naming of new macros before merging into master.
...
Requires re-generation of files generated with dev_get_rid_of_ternary_operator.
2013-09-13 11:30:58 +03:00
Petteri Aimonen
59cba0beea
Expand extra_fields test to cover field skipping in case of streams.
2013-09-11 17:33:50 +03:00
Petteri Aimonen
152c2c910c
Disable warning about uint64_t (long long)
2013-09-11 16:51:53 +03:00
Petteri Aimonen
2b72815036
Fix build error when path contains spaces
2013-09-11 16:45:52 +03:00
Petteri Aimonen
61ad04afd5
Merge branch 'dev_tests_using_scons'
2013-09-11 16:13:19 +03:00
Petteri Aimonen
9f93d39f72
Add tests for different compilation options
2013-09-11 14:55:56 +03:00
Petteri Aimonen
d395768c8d
Windows build fixes
2013-09-11 13:42:56 +03:00
Petteri Aimonen
b9f14bddf7
Make all the tests ANSI C compatible.
2013-09-11 13:16:20 +03:00
Petteri Aimonen
840e213b9f
Get rid of the ternary operator in the pb_field_t initialization.
...
Some compilers where unable to detect that the ternary operator
can be evaluated at the compile time. This commit does the evaluation
on the Python side, which should fix the problem.
The new .pb.c files are generated using PB_FIELD2() macro. The old
PB_FIELD() macro remains, so that previously generated files keep
working.
2013-09-11 09:53:51 +03:00
Petteri Aimonen
e2e9980627
Move the rest of the tests to scons
2013-09-10 22:34:54 +03:00
Petteri Aimonen
0bbcb7b367
Compiler options for GCC, clang and tcc
2013-09-10 20:54:29 +03:00
Petteri Aimonen
696a01bf14
Move the declarations of _pb_ostream_t and _pb_istream_t before first use.
...
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-09-10 17:53:21 +03:00
Petteri Aimonen
f04ab838ab
Build fixes for Windows/Visual C++
2013-09-10 17:53:07 +03:00
Petteri Aimonen
e681dd0d75
Add an example pb_syshdr.h file for platforms without C99.
...
This allows building the tests easily on Visual C++ in C mode.
Also add checks to pb.h that the defined integer types are of
the proper sizes. This may prevent some difficult to debug problems
later..
2013-09-10 12:39:39 +03:00
Petteri Aimonen
4dccf28ba9
Convert more test cases to scons
2013-09-10 11:34:57 +03:00
Petteri Aimonen
5b9ad17dc2
Move the declarations of _pb_ostream_t and _pb_istream_t before first use.
...
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-09-09 10:53:04 +03:00
Petteri Aimonen
4821e7f457
Add support for running the nanopb generator as protoc plugin.
...
Will be used to implement issue 47.
For now, symlink nanopb_generator.py as protoc-gen-nanopb and
use protoc --nanopb_out=. to call it.
2013-09-08 19:55:05 +03:00
Petteri Aimonen
262c62676c
Start moving the tests into subfolders. Transition to SCons for build system for the tests.
...
Only a few tests updated so far. Have to include all the rest before merging to mainline.
Update issue 63
Status: Started
2013-09-08 17:52:03 +03:00
Petteri Aimonen
d7f3a74388
Handle unsupported extension field types more gracefully.
...
Previously the generator would stop with NotImplementedException as
soon as a required or repeated extension field is found. New behaviour
is to just ignore the unsupported field and note that in a comment
in the generated file.
Furthermore, allow skipping of extension fields using the generator
option (nanopb).type = FT_IGNORE.
Update issue 83
Status: FixedInGit
2013-09-08 11:05:20 +03:00
Petteri Aimonen
4aef194a99
Setting version to 0.2.3-dev
2013-08-18 22:12:31 +03:00
Petteri Aimonen
81cf30034b
Publishing nanopb-0.2.2
nanopb-0.2.2
2013-08-18 22:11:38 +03:00
Petteri Aimonen
dd72698508
Update changelog
2013-08-08 20:45:30 +03:00
Petteri Aimonen
f15093e8bd
Document field extensions support
...
Update issue 17
Status: FixedInGit
2013-08-08 20:42:46 +03:00
Petteri Aimonen
b663909fb6
Document PB_SYSTEM_HEADER
2013-08-08 20:05:30 +03:00
Petteri Aimonen
ba40cacd3c
Finish the testcase for extensions
2013-07-22 19:00:04 +03:00
Petteri Aimonen
1f13e8cd2c
Fix bugs in extension support when multiple extension fields are present.
2013-07-22 18:59:15 +03:00
Petteri Aimonen
64947cb382
Extension support implemented for decoder.
...
Testing is still needed. Also only 'optional' extension fields
are supported now, 'repeated' fields are not yet supported.
2013-07-17 20:21:51 +03:00
Petteri Aimonen
0343e2bcfe
Add test case for extensions decoding
2013-07-17 19:29:06 +03:00
Petteri Aimonen
ebddda9b5c
Implement extension support for the encoder
2013-07-17 19:23:19 +03:00
Petteri Aimonen
7c5e184c26
Implement generator support for extension fields (no encoder/decoder support yet)
2013-07-17 00:06:54 +03:00
Petteri Aimonen
f064c2c48a
Fix formatting in documentation
2013-07-16 11:31:38 +03:00
Kent Ryhorchuk
3c10e6fa71
Check for empty message type before incrementing required_field_index.
...
If you have a message that defined as empty, but attempt to decode a
message that has one or more unknown fields then pb_decode fails. The
method used to count the number of required fields counts 1 required
field because the default type of PB_LAST_FIELD is PB_HTYPE_REQUIRED.
2013-07-16 11:07:48 +03:00
Petteri Aimonen
a01856f4ab
Add test case for extra fields in AllTypes
2013-07-16 11:07:34 +03:00
Petteri Aimonen
bb985e9927
Add pb_decode_delimited and pb_encode_delimited wrapper functions.
...
Update issue 74
Status: FixedInGit
2013-07-06 16:16:00 +03:00
Petteri Aimonen
314460c2a5
Clean up the comments in pb_encode.h and pb_decode.h
2013-07-06 15:55:15 +03:00