Commit Graph

10 Commits

Author SHA1 Message Date
Michael Poole
ba93b65e9f Set the defaults properly for newly allocated submessages.
Also, pb_dec_submessage() should have used calloc() instead of malloc()
in the first place.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1083 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 22:01:37 +02:00
Michael Poole
c66c6b43c4 Support dynamic allocation for string, bytes and message fields.
This is turned on by passing -p to nanopb_generator.py or setting the
(nanopb).pointer option for a .proto field.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1081 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 22:01:30 +02:00
Michael Poole
8e5337e9ef Merge the generated has_<name> fields into a single one.
git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1008 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 22:01:24 +02:00
Michael Poole
43b8e20744 Create a message descriptor type.
This replaces the sentinel at the end of the pb_field_t
array for each message type.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1007 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 22:01:17 +02: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
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
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
0c5bc4caf9 Unittests for encode
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@952 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-10 17:54:15 +00:00