Organize allocation logic in generator, add pb_bytes_ptr_t.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 9 Dec 2013 17:19:12 +0000 (19:19 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Sun, 29 Dec 2013 16:35:57 +0000 (18:35 +0200)
commit25516b059137be64735276bbe3a96029f4c926be
tree046dc037c96cf9b4243e2eba533d4a555bf15f1f
parent414e637867c513ba9aa199e106c6d576e5b60287
Organize allocation logic in generator, add pb_bytes_ptr_t.

Allocation decision is now made before the field data type is decided.
This way the data type decisions can more cleanly account for the allocation
type, i.e. FT_DEFAULT logic etc.

Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point
generating separate structs for these, as they would all be of the same type.
generator/nanopb_generator.py
pb.h
pb_encode.c
tests/alltypes_pointer/encode_alltypes_pointer.c