94 Commits

Author SHA1 Message Date
Petteri Aimonen
5aa8207ab1 Setting version to nanopb-0.3.3-dev 2015-01-24 17:40:42 +02:00
Petteri Aimonen
acd7291791 Publishing nanopb-0.3.2 2015-01-24 17:33:01 +02:00
Petteri Aimonen
d2e023e3e5 Bugfixes for oneof support.
Fixes crashes / memory leaks when using pointer type fields.
Also fixes initialization of which_oneof fields.
2015-01-11 19:46:15 +02:00
Petteri Aimonen
7713d43bc3 Implement support for oneofs (C unions).
Basic test included, should probably add an oneof to the AllTypes test also.

Update issue 131
Status: Started
2015-01-04 19:39:37 +02:00
Petteri Aimonen
b0d31468da Change PB_RETURN_ERROR() macro to avoid compiler warnings.
Update issue 140
Status: FixedInGit
2015-01-03 10:59:19 +02:00
Petteri Aimonen
418f7d88b3 Add support for POINTER type in extensions 2014-12-26 18:23:36 +02:00
Petteri Aimonen
cfc517f36b Add compilation option to disable struct packing.
Update issue 136
Status: FixedInGit
2014-12-22 20:52:40 +02:00
Petteri Aimonen
baf44b367f Set version to nanopb-0.3.2-dev 2014-09-16 20:41:45 +03:00
Petteri Aimonen
b947dc6e2c Publishing nanopb-0.3.1 2014-09-11 19:36:14 +03:00
Petteri Aimonen
71b81ad573 Setting version to 0.3.1-dev 2014-08-26 18:20:48 +03:00
Petteri Aimonen
8dede6095e Publishing nanopb-0.3.0 2014-08-26 18:08:31 +03:00
Petteri Aimonen
3ed219382e Add #if guard for .pb.h version.
The version in PB_PROTO_HEADER_VERSION can be bumped whenever there
is a breaking change to the generated files, and it will then alert
to the difference.

Update issue 129
Status: FixedInGit
2014-08-19 17:55:44 +03:00
Petteri Aimonen
be0b9e047a Rename poorly named identifier to avoid name conflicts.
Update issue 106
Status: FixedInGit
2014-08-18 21:11:10 +03:00
Petteri Aimonen
62b4a8ecaa Rename UNUSED() and STATIC_ASSERT() macros with PB_ prefix.
This avoids possible namespace conflicts with other macros.
2014-08-18 20:49:48 +03:00
Petteri Aimonen
1dd9f1900f Change the _count fields to use pb_size_t datatype.
Update issue 82
Status: FixedInGit
2014-08-18 20:09:52 +03:00
Petteri Aimonen
0150b98be6 Setting version to 0.3.0-dev 2014-08-09 22:18:24 +03:00
Petteri Aimonen
2f05a35b5f Publishing nanopb-0.2.9 2014-08-09 22:01:04 +03:00
Petteri Aimonen
8611958a7f Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain
Patch from Jon Read.

Update issue 119
Status: FixedInGit
2014-05-30 13:45:48 +03:00
Petteri Aimonen
2e9797af58 Setting version to 0.2.9-dev 2014-05-20 19:52:09 +03:00
Petteri Aimonen
916bcb3643 Publishing nanopb-0.2.8 2014-05-20 19:35:00 +03:00
Petteri Aimonen
938c7ac3f3 Setting version to 0.2.8-dev 2014-04-07 20:45:04 +03:00
Petteri Aimonen
6d74c66ada Publishing nanopb-0.2.7 2014-04-07 20:30:42 +03:00
Petteri Aimonen
7880f308ea Fix unused parameter warning when building without errmsg. 2014-04-05 13:25:44 +03:00
Petteri Aimonen
e5b855fec5 Add a 'found' field to pb_extension_t.
Update issue 112
Status: FixedInGit
2014-04-05 11:11:05 +03:00
Petteri Aimonen
607cb998b5 More configuration options for dynamic alloc 2014-03-17 17:25:58 +02: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
011a30af9c Beginnings of malloc support in pb_decode 2014-02-24 21:09:25 +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
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
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
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
ee5b12c537 Add PB_LTYPE_UVARINT to fix encoding of negative int32 values.
Apparently int32 values that are negative must be cast into int64 first
before being encoded. Because uint32 still needs to be cast to uint64,
the cases for int32 and uint32 had to be separated.

Update issue 97
Status: FixedInGit
2013-12-21 12:16:03 +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
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
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
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
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
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
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
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
0ed3158560 Add section in pb.h for changing compilation settings.
Update issue 76
Status: FixedInGit
2013-07-06 15:27:31 +03:00