Petteri Aimonen
6d74c66ada
Publishing nanopb-0.2.7
2014-04-07 20:30:42 +03:00
Petteri Aimonen
6c90e824c4
Fix compile error when default value given for extension field.
...
Update issue 111
Status: FixedInGit
2014-04-01 16:47:53 +03:00
Petteri Aimonen
9be2cfe968
Get rid of pb_bytes_ptr_t, just allocate pb_bytes_array_t dynamically.
...
This makes the internal logic much simpler, and also keeps the datatypes
more similar between STATIC/POINTER cases. It will still be a bit cumbersome
to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and
PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier.
This has the drawback that it is no longer as easy to use externally allocated
byte array as input for bytes field in pointer mode. However, this is still
easy to do using callbacks, so it shouldn't be a large issue.
2014-03-15 08:45:58 +02:00
Petteri Aimonen
842c960d5d
Setting version to 0.2.7-dev
2014-02-15 17:15:54 +02:00
Petteri Aimonen
7f397b067f
Publishing nanopb-0.2.6
2014-02-15 16:40:38 +02:00
Petteri Aimonen
542463dbaa
Move descriptor.proto to google/protobuf directory where it belongs.
...
This fixes some interoperability problems when trying to compile
nanopb.proto for e.g. the Google's C++ library.
Update issue 104
Status: FixedInGit
2014-02-12 19:43:04 +02:00
Petteri Aimonen
bd22cf2777
Improve status/error reporting in generator.
...
Update issue 105
Status: FixedInGit
2014-02-12 18:51:48 +02:00
Petteri Aimonen
879860be19
Add coments to places where STATIC_ASSERT is used.
...
Update issue 96
Status: FixedInGit
2014-02-04 20:34:57 +02:00
Petteri Aimonen
a2f8112166
Add proper suffixes for integer default values.
...
Update issue 102
Status: FixedInGit
2014-02-04 20:24:44 +02:00
Petteri Aimonen
a46ed9f475
Fix problem with callback-type fields (issue #99 ).
2014-01-03 11:17:39 +02:00
Petteri Aimonen
843fc4b11a
Setting version to 0.2.6-dev
2014-01-01 11:44:47 +02:00
Petteri Aimonen
906c8283b5
Publishing nanopb-0.2.5
2014-01-01 11:20:54 +02:00
Petteri Aimonen
125b49bf24
Fix spaces in paths on Windows also
2013-12-29 21:36:06 +02:00
Petteri Aimonen
7c9a8a132b
Fix protoc-gen-nanopb when the path contains spaces
2013-12-29 20:48:30 +02:00
Petteri Aimonen
435ccbfdf7
Fixes for pyinstaller
2013-12-29 20:26:58 +02:00
Petteri Aimonen
dde71cb426
Make generator print errors to stderr.
...
Otherwise they won't be visible when run as a protoc plugin.
2013-12-29 20:26:58 +02:00
Petteri Aimonen
d7cadaa46f
Windows build fixes
2013-12-29 20:26:57 +02:00
Petteri Aimonen
45c1a32e50
Rework the Makefiles to be compatible with binary packages.
2013-12-29 20:26:57 +02:00
Petteri Aimonen
ec517e2108
Add build script for windows package
2013-12-29 20:26:57 +02:00
Petteri Aimonen
8c2dda67a1
Add descriptor.proto to repository to avoid messing with protoc include path.
2013-12-29 20:26:57 +02:00
Petteri Aimonen
356535da9b
Move the generator .proto files to a subdir, and get rid of precompiled versions.
2013-12-29 20:26:57 +02:00
Petteri Aimonen
25516b0591
Organize allocation logic in generator, add pb_bytes_ptr_t.
...
Allocation decision is now made before the field data type is decided.
This way the data type decisions can more cleanly account for the allocation
type, i.e. FT_DEFAULT logic etc.
Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point
generating separate structs for these, as they would all be of the same type.
2013-12-29 18:35:57 +02:00
Martin Donath
4ae3b2e566
Generating and encoding messages with dynamic allocaiton
2013-12-29 18:35:57 +02:00
Petteri Aimonen
4f37c083d5
Negative int32 values take 10 bytes now.
2013-12-22 23:24:02 +02:00
Petteri Aimonen
321ca6c1d5
Setting version to 0.2.5-dev
2013-11-07 16:47:14 +02:00
Petteri Aimonen
935a26ab1c
Publishing nanopb-0.2.4
2013-11-07 16:44:41 +02:00
Petteri Aimonen
dcdd7f98fd
Generate #define tags for extension fields also.
...
Update issue 93
Status: FixedInGit
2013-11-02 22:05:49 +02: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
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
2013-09-18 12:44:46 +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
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
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
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
2013-08-18 22:11:38 +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
7c5e184c26
Implement generator support for extension fields (no encoder/decoder support yet)
2013-07-17 00:06:54 +03:00
Petteri Aimonen
6e9e532927
Document the .options file usage.
...
Also add note about the 'packed' message option being incompatible
with CPUs that do not support unaligned access.
Update issue 12
Status: FixedInGit
Update issue 77
Status: FixedInGit
2013-07-06 13:49:47 +03:00
Petteri Aimonen
a1cec46b3e
Include the field tags in the generated .pb.h file.
...
Patch from Michael Haberler.
2013-06-03 22:46:19 +03:00
Petteri Aimonen
bfd7cb36b9
Setting version to 0.2.2-dev
2013-04-14 10:07:46 +03:00
Petteri Aimonen
ef741ea530
Publishing nanopb-0.2.1
2013-04-14 10:06:47 +03:00
Petteri Aimonen
384e686fe6
Do not generate has_ fields for callback fields.
...
The arg field can be used to store the field presence from inside
the callback. Furthermore, having the has_ field for encoding callbacks
would be more annoying than useful.
Update issue 70
Status: FixedInGit
2013-04-02 20:01:31 +03:00
Petteri Aimonen
1396dce2ae
Add support for packed structures on IAR and MSVC.
...
Update issue 66
Status: FixedInGit
2013-03-13 15:22:00 +02:00
Petteri Aimonen
6468f23d23
Make the generator options accept a file name in addition to format string.
2013-03-09 23:03:09 +02:00