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
Petteri Aimonen
0f6b615ae3
Added an encode/decode test for 'required' fields of all types.
2012-01-12 19:06:33 +02:00
Petteri Aimonen
a1adf39805
Fixed a bug in the generator that caused a compiler error on sfixed32 and sfixed64 fields.
2012-01-12 18:10:12 +02:00
Petteri Aimonen
b519edba9d
Linewrapping in license
nanopb-0.1.0
2012-01-06 19:04:49 +02:00
Petteri Aimonen
28aa0ce096
Added logo for project :)
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1095 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 18:35:12 +00:00
Petteri Aimonen
b5fb97f6f5
Make the fuzztest runnable again
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1091 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30 09:05:01 +00:00
Petteri Aimonen
a3f5e4d81f
Expanding the tests to better cover decoding from memory buffer.
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1090 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30 08:57:27 +00:00
Petteri Aimonen
1506450b11
Fixed a bug related to submessage encoding into memory buffer.
...
Stream state was not copied back from substream in pb_enc_submessage,
which caused garbage output if the stream callback modified the state.
Expanded tests to cover this problem.
Thanks to Paweł Pery for debugging and reporting this problem.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1089 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30 08:43:50 +00:00
Petteri Aimonen
ad7a0e2111
Merged 0005-Handle-endianness-correctly.patch by Matt Kern.
...
On big endian machines, pb_dec_fixed32 and pb_dec_fixed64 were
incorrectly overwriting the result value even if reading failed.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1022 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30 15:08:32 +00:00
Petteri Aimonen
2a80ff2bd5
Merged 0004-Added-missing-trailing-newlines.patch by Matt Kern.
...
Just adding newlines at the end of files to satisfy old GCC versions.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1021 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30 15:03:23 +00:00
Petteri Aimonen
e66675a25d
Merged 0003-Fixed-format-specifiers.patch by Matt Kern.
...
Fixes cross-platform issues with the length modifier in printf specifiers,
most importantly %d -> %ld.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1020 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30 15:01:59 +00:00
Petteri Aimonen
a77ab47c29
Added Makefile for generating nanopb_pb2.py.
...
I still left the precompiled version in place, as it "often works" :)
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1019 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30 14:59:25 +00:00
Petteri Aimonen
13b6988b64
Fix some compiler warnings in strict C89 mode
...
Contributed by Michael Poole.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1004 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-10 16:19:55 +00:00
Petteri Aimonen
85e0afd894
Some additions to documentation
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1003 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-04 07:22:05 +00:00
Petteri Aimonen
c7e2d6cc2f
Documentation outdated phrase
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@980 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-18 16:10:08 +00:00
Petteri Aimonen
d96e9575d4
Added comments to the simplest decode/encode examples.
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@979 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-18 16:04:45 +00:00
Petteri Aimonen
b2a696795e
Added README
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@976 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-14 10:36:04 +00:00
Petteri Aimonen
fcfc99f766
Fixed a bunch of bugs related to callback fields.
...
Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults.
Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface
a bit easier to use, and in addition runs faster.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-13 16:14:08 +00:00
Petteri Aimonen
d4abb63c05
Tests for callback fields
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@974 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-12 18:53:33 +00:00
Petteri Aimonen
35814517ad
Python 2.6 compatibility for the generator
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@973 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-01 08:30:48 +00:00
Petteri Aimonen
1604000714
Cyclic messages not supported - thanks to Josh for pointing this out.
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@972 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 19:03:28 +00:00
Petteri Aimonen
fab52deda9
Make fuzz test runnable again :)
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@971 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 18:23:05 +00:00
Petteri Aimonen
9af96cd669
Generator bugfixes
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@970 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 13:52:08 +00:00
Petteri Aimonen
646e3c4944
documentation
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@969 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 12:57:16 +00:00
Petteri Aimonen
4c76c9c398
makefile fix
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@968 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 12:14:44 +00:00
Petteri Aimonen
9cb63dd266
wrong file name
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@967 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24 12:13:24 +00:00
Petteri Aimonen
a353417021
More unittests
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@966 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 18:50:09 +00:00
Petteri Aimonen
64ac18c884
Changed autogenerated file naming from foo.c to foo.pb.c
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 16:16:33 +00:00
Petteri Aimonen
9966a8c9b6
more unittests
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@964 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 15:57:47 +00:00
Petteri Aimonen
7780da38e8
license
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@963 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 15:57:40 +00:00
Petteri Aimonen
5e27a83f9c
Allocated extension number
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@962 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 15:57:20 +00:00
Petteri Aimonen
8b635924ba
check return values
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@961 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 13:33:43 +00:00
Petteri Aimonen
5490163200
More unittests
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@960 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 09:59:18 +00:00
Petteri Aimonen
5a9f85b876
unittests, change to PB_LTYPE_BYTES data size
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22 18:57:23 +00:00
Petteri Aimonen
494fbd91e4
example client
...
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@958 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22 15:22:41 +00:00