diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-08-18 20:09:52 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-08-18 20:09:52 +0300 |
commit | 1dd9f1900fca0c137324c05a9421f1ba180b2470 (patch) | |
tree | f0788fa698b0c49bc06dfea181a1d062a4feb09f /docs | |
parent | 0b517b07789049089e19b714311c596399d53f8e (diff) |
Change the _count fields to use pb_size_t datatype.
Update issue 82
Status: FixedInGit
Diffstat (limited to 'docs')
-rw-r--r-- | docs/migration.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/migration.rst b/docs/migration.rst index 9d41f5b1..800bc1f9 100644 --- a/docs/migration.rst +++ b/docs/migration.rst @@ -31,6 +31,21 @@ functionality is not needed. **Error indications:** Linker error: undefined reference to *pb_field_iter_begin*, *pb_field_iter_next* or similar. +Change data type of field counts to pb_size_t +--------------------------------------------- +**Rationale:** Often nanopb is used with small arrays, such as 255 items or +less. Using a full *size_t* field to store the array count wastes memory if +there are many arrays. There already exists parameters *PB_FIELD_16BIT* and +*PB_FIELD_32BIT* which tell nanopb what is the maximum size of arrays in use. + +**Changes:** Generator will now use *pb_size_t* for the array *_count* fields. +The size of the type will be controlled by the *PB_FIELD_16BIT* and +*PB_FIELD_32BIT* compilation time options. + +**Required actions:** Regenerate all *.pb.h* files. In some cases casts to the +*pb_size_t* type may need to be added in the user code when accessing the +*_count* fields. + Nanopb-0.2.9 (2014-08-09) ========================= |