dch
be78e3b4d0
Fix build warnings on MS compilers
...
Update issue 33
Status: FixedInGit
2012-09-03 17:18:49 +03:00
Petteri Aimonen
11e0918b5e
Created a CHANGELOG file for easy reference.
nanopb-0.1.6
2012-09-02 20:49:08 +03:00
Petteri Aimonen
07d44cf632
Clean up one (uint64_t) cast.
2012-09-02 20:14:22 +03:00
Petteri Aimonen
f187aad63d
Fix -Wextra warning in generated .pb.c files.
...
Compile the generated files with the same extra-strict
settings as the core, in order to detect problems in tests.
Update issue 32
Status: FixedInGit
2012-09-02 19:54:35 +03:00
Petteri Aimonen
a06dba6e49
Fix warnings with -Wcast-qual. Add test for C++ compile.
...
Update issue 27
Status: FixedInGit
2012-08-26 15:21:20 +03:00
Petteri Aimonen
160f02e4d0
Add pb_decode_noinit and use it from pb_dec_submessage.
...
This avoids double initialization when decoding nested submessages.
Fixes an issue with submessage arrays that was present in previous
version of this patch.
Update issue 28
Status: FixedInGit
2012-08-26 11:04:55 +03:00
Petteri Aimonen
a7a6cdad88
Added alltypes-testcases for optional fields and default values.
2012-08-26 10:57:51 +03:00
Petteri Aimonen
1463e687e3
Revert "Add pb_decode_noinit and use it from pb_dec_submessage."
...
The patch breaks default values inside submessage arrays (I think).
Have to add test cases and check back.
This reverts commit f1d7640fe1 .
2012-08-26 10:05:46 +03:00
Petteri Aimonen
f1d7640fe1
Add pb_decode_noinit and use it from pb_dec_submessage.
...
This avoids double initialization when decoding nested submessages.
Update issue 28
Status: FixedInGit
2012-08-26 09:56:11 +03:00
Petteri Aimonen
440da6959f
Add note that stream callbacks must read the whole requested length.
...
Fixes issue #22 .
2012-08-24 21:32:42 +03:00
Petteri Aimonen
0fb5e5e068
Implement error messages in the decoder side.
...
Update issue 7
Status: Started
2012-08-24 21:22:20 +03:00
Petteri Aimonen
ea57f74741
Document pb_close_string_substream.
2012-08-24 20:51:29 +03:00
Petteri Aimonen
9383f305dc
Revert "Change the substream implementation in pb_decode."
...
This reverts commit dc2da0edc5 .
Add pb_close_string_substream() for copying back the state.
This makes adding error messages easier in the future, as also
them need to be propagated back from the substream.
2012-08-24 20:43:39 +03:00
Petteri Aimonen
2941e90e04
Reorganize the field decoder interface.
...
This makes the field decoding functions more intuitive to use.
The old interface is still present if you specify NANOPB_INTERNALS.
Update issue 2
Status: FixedInGit
2012-08-24 20:23:25 +03:00
Petteri Aimonen
dc2da0edc5
Change the substream implementation in pb_decode.
...
This makes it unnecessary to copy back the state, and also relaxes
the requirements on callbacks (bytes_left will always be valid).
It decreases code size by a few bytes, but may be just slightly slower.
2012-08-24 19:35:17 +03:00
Petteri Aimonen
86257a2a70
Fix a confusing statement in a comment.
2012-08-24 19:25:29 +03:00
Stan Hu
07f24f9b70
Fix casting issues
2012-08-16 22:06:19 +03:00
Petteri Aimonen
8d5086f052
Declare warn_unused_result only on GCC >= 3.4.0.
...
Thanks to cea.max.simoes for bug report & fix.
Update issue 25
Status: FixedInGit
2012-08-09 16:15:23 +03:00
Petteri Aimonen
1aa61f108a
Fix signedness warning in example_unions.
nanopb-0.1.5
2012-08-04 14:34:19 +03:00
Petteri Aimonen
b582bc9bf6
Fix bug in decoder with packed arrays.
...
Update issue 23
Status: FixedInGit
2012-07-31 19:12:57 +03:00
Petteri Aimonen
5703ad0c55
Extend 'alltypes' testcase to cover repeated fields.
2012-07-31 19:10:33 +03:00
Petteri Aimonen
0a5b6852ec
Additional unsigned vs. signed fix for tag
2012-07-19 09:05:36 +03:00
Petteri Aimonen
8524de39ce
Fix an unsigned vs. signed warning on some compiler.
2012-07-18 21:21:07 +03:00
Petteri Aimonen
10b5da12dc
Fixed a few compiler warnings, added check.
...
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-18 21:09:13 +03:00
Petteri Aimonen
d8bddabb83
Fix bug with .proto without messages (again), and add a test case for it.
nanopb-0.1.4
2012-07-05 20:02:06 +03:00
Petteri Aimonen
01a1556898
Apparently some compilers don't want to automatically cast size_t to uint64_t.
2012-07-05 18:27:07 +03:00
Petteri Aimonen
efef38cf78
Fix some typos in __BIG_ENDIAN__ code
2012-07-05 18:24:11 +03:00
Petteri Aimonen
72cca8d783
Replace #warning with the standard #error.
2012-07-05 18:19:38 +03:00
Stan Hu
7c5bb6541a
Cast enum vaules to integers and cast them back where appropraite
...
to prevent mixed enumeration type compiler warnings
2012-07-05 18:13:50 +03:00
Petteri Aimonen
9b1e1b440a
Replace PB_MANY_FIELDS with PB_FIELD_16BIT and PB_FIELD_32BIT.
...
This allows more precise control over the memory use vs. field size.
2012-07-01 10:15:37 +03:00
Petteri Aimonen
78086cc27d
Add PB_MANY_FIELDS option for supporting fields > 255.
...
Add generator warning if this is necessary.
Fixes issue #14 .
2012-06-30 19:28:49 +03:00
Petteri Aimonen
67add3259a
Warn if PB_MAX_REQUIRED_FIELDS is not large enough.
2012-06-30 18:23:18 +03:00
Petteri Aimonen
95eb4a5499
Improve the detection of missing required fields.
...
Now the limit of tracked fields is configurable at compile-time using
PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation.
Fixes issue #18 .
2012-06-30 18:10:08 +03:00
Petteri Aimonen
7bcf7ef579
Fixed formatting in docs
2012-06-25 22:17:13 +03:00
Petteri Aimonen
99375a132f
Documented NANOPB_INTERNALS compilation option
2012-06-25 22:08:05 +03:00
Petteri Aimonen
c07e576de8
Note about __BIG_ENDIAN__ compilation option
2012-06-25 21:45:40 +03:00
Petteri Aimonen
3a919ddc5e
Fix error when .proto contains no Messages (e.g. just enums).
...
Thanks to Paul Fertser for reporting this bug.
2012-06-20 21:31:23 +03:00
Petteri Aimonen
0f1d5cca59
Added example on how to handle unions.
2012-06-16 14:08:40 +03:00
Petteri Aimonen
e18352d506
Added new functions to public interface in pb_decode.h.
...
pb_decode_tag and pb_skip_field allow manually iterating the fields
in a message.
2012-06-16 14:07:37 +03:00
Petteri Aimonen
7e1059628c
Fix non-constant initializer errors with some compilers.
...
Fixes issue #13 . Thanks to Kevin Worth for reporting.
2012-06-13 21:43:40 +03:00
Petteri Aimonen
5af2c97ecd
Add descriptor.proto into the #include exclusion list
nanopb-0.1.3
2012-06-12 17:51:08 +03:00
Petteri Aimonen
feddc0115c
Merge branch 'master' of https://code.google.com/p/nanopb
2012-05-19 21:25:47 +03:00
Petteri Aimonen
f9501ca185
Add better error messages in the generator when libraries cannot be imported.
...
Fixes issue #5 .
2012-05-19 21:25:10 +03:00
Petteri Aimonen
b943290886
Fix 64-bitness warnings in the example.
...
Fixes issues 9 and 10.
2012-05-19 21:17:24 +03:00
Petteri Aimonen
d1ca88d20e
Fixing compiler warnings, mostly related to unused parameters.
...
Thanks to David Hotham for the patch. Fixes issue 8.
2012-04-18 20:15:36 +03:00
Petteri Aimonen
9fbe9a5de3
Refactoring the field encoder interface.
...
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.
2012-03-01 13:46:52 +02:00
Petteri Aimonen
0cdc623050
Modified nanopb_generator.py to generate includes for other .proto files.
...
Implementation was suggested by extremeblue99.
Fixes issue 4.
nanopb-0.1.2
2012-02-15 17:34:48 +02:00
Petteri Aimonen
f6b08404fa
Fixed nanopb_generator.py to read the input file in binary mode.
2012-01-30 10:36:17 +02:00
Petteri Aimonen
b36a1a259a
Improved documentation on field decoders.
2012-01-23 18:13:26 +02:00
Petteri Aimonen
113bd7ee87
Fixed issue 1 reported by Erik Rosen:
...
The size of non-callback bytes-fields was miscalculated, which
caused all following fields in a message to contain garbage.
Previous commit contains a testcase for this.
This fix changes the generated message description. If your protocol uses
bytes-fields, you should regenerate *.pb.c.
nanopb-0.1.1
2012-01-12 19:08:05 +02:00