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
This commit is contained in:
Michael Poole
2011-11-13 18:10:11 +00:00
committed by Petteri Aimonen
parent dcf43a6416
commit 43b8e20744
17 changed files with 127 additions and 101 deletions

View File

@@ -58,7 +58,7 @@ int main()
testmessage.submsg.fixed32value.funcs.encode = &encode_fixed32;
testmessage.submsg.fixed64value.funcs.encode = &encode_fixed64;
if (!pb_encode(&stream, TestMessage_fields, &testmessage))
if (!pb_encode(&stream, TestMessage_msg, &testmessage))
return 1;
if (fwrite(buffer, stream.bytes_written, 1, stdout) != 1)