mlot / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

Reconsider the implementation of default values #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently nanopb dynamically initializes optional fields to default values.

This is a somewhat rarely used feature, and is not implemented for all field 
types (e.g. string pointers, extension fields).

Issue #79 could provide a smaller code size implementation for the same 
functionality, while allowing a faster memset() to zero to be used when default 
values are not needed. This however requires changes to user applications when 
default values are used.

Review this for nanopb-0.3.

Original issue reported on code.google.com by Petteri.Aimonen on 1 Apr 2014 at 1:47

GoogleCodeExporter commented 9 years ago
This would cause default value initialization to not work with dynamically 
allocated values. Not sure if that is important or not.

Original comment by Petteri.Aimonen on 4 Aug 2014 at 4:23

GoogleCodeExporter commented 9 years ago

Original comment by Petteri.Aimonen on 26 Aug 2014 at 3:28