Petteri Aimonen
09ec60cadf
Publishing nanopb-0.1.8
nanopb-0.1.8
2012-12-13 21:29:57 +02:00
Petteri Aimonen
871e5be9dd
Fix small error in field callback documentation.
...
Update issue 44
Status: FixedInGit
2012-12-06 11:13:53 +02:00
Jens Steinhauser
068de05c51
Complete initialization of pb_istream_t.
...
Because PB_RETURN_ERROR checks if the 'errmsg' member is NULL before
assigning to it, error messages would get lost.
2012-11-27 19:55:21 +02:00
Steffen Siering
1f8fb1f1ed
Use TESTS variable to define dependencies for run_unittests
2012-11-16 09:59:04 +02:00
Petteri Aimonen
434dcbb2ee
Select compilation options based on $(CC) in tests/Makefile.
...
Makes 'make CC=clang' work.
Based on patch submitted by Steffen Siering.
Update issue 40:
Status: FixedInGit
2012-11-16 09:51:23 +02:00
Petteri Aimonen
59788e2aab
Rename test_compiles.c to test_multiple_files.c
2012-11-16 09:33:11 +02:00
Steffen Siering
cc29958d34
Fix STATIC_ASSERT macro when using multiple .proto files.
...
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-16 09:24:39 +02:00
Petteri Aimonen
0abb764b18
Fix naming of nested Enums with short names
2012-11-14 00:43:51 +02:00
Petteri Aimonen
02ecee2de8
Fix naming of enums when long_names=false.
...
Modify test case to check that options.pb.o compiles.
Update issue 42
Status: FixedInGit
Update issue 43
Status: FixedInGit
2012-11-14 00:36:16 +02:00
Petteri Aimonen
332a9ee95c
Fix changelog
2012-11-11 11:20:34 +02:00
Petteri Aimonen
fc6f56b2bd
Setting version to 0.1.8-dev
2012-11-11 11:19:17 +02:00
Petteri Aimonen
92bb37b074
Publishing nanopb-0.1.7
nanopb-0.1.7
2012-11-11 11:16:01 +02:00
Petteri Aimonen
ad9a885644
Document new generator options
2012-10-29 19:33:33 +02:00
Petteri Aimonen
08391f35ee
Add nanopb version number to generated files.
...
tools/set_version.sh is used to update the values.
Update issue 36
Status: FixedInGit
2012-10-29 19:15:34 +02:00
Petteri Aimonen
3aaa4ad8c2
Add extern "C" to header files.
...
Update issue 35
Status: FixedInGit
2012-10-29 19:03:19 +02:00
Petteri Aimonen
db1eefc24b
Add option to use short names for enum values.
...
Update issue 38
Status: FixedInGit
2012-10-29 18:55:49 +02:00
Petteri Aimonen
0ee4bb96b1
Allow defining field type in .proto.
...
Update issue 30
Status: FixedInGit
2012-10-29 18:34:24 +02:00
Petteri Aimonen
28b0136ea4
Improve .proto options parsing.
...
Options can now be defined on command line, file, message or in field
scope.
Update issue 12
Status: Started
2012-10-29 18:20:15 +02:00
Petteri Aimonen
9e0ee92f0a
Use optparse in nanopb_generator.py
2012-10-29 17:25:16 +02:00
Petteri Aimonen
c3fa362653
Give names to generated structures to allow forward declaration.
...
Update issue 39
Status: FixedInGit
2012-10-29 16:56:45 +02:00
Petteri Aimonen
bffd3a9acc
Improve the person_with_extra_field test.
...
Added a field after the extra field to verify it's also ok.
2012-10-21 21:31:20 +03:00
Petteri Aimonen
dcab39a41c
Remove the "buf = NULL" => skip requirement from pb_istream_t callbacks.
...
Rationale: it's easy to implement the callback wrong. Doing so introduces
io errors when unknown fields are present in the input. If code is not
tested with unknown fields, these bugs can remain hidden for long time.
Added a special case for the memory buffer stream, where it gives a small
speed benefit.
Added testcase for skipping fields with test_decode2 implementation.
Update issue 37
Status: FixedInGit
2012-10-18 19:45:28 +03:00
Petteri Aimonen
900c8dd125
Add tests for negative values in the alltypes testcase.
2012-10-14 12:27:08 +03:00
Petteri Aimonen
3f563792ad
Add buffer size check in test_decode1.c example.
...
This check gives a better error message in case you test stuff
and have a message longer than 512 bytes.
Update issue 34
Status: FixedInGit
2012-09-18 16:51:22 +03:00
Petteri Aimonen
b214de4e1e
Enable -Wconversion for core and fix the warnings.
...
This should help avoid issue 33 in the future.
2012-09-03 17:35:14 +03:00
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