The Nanopb implementation (plain C, not C++) has a max_size option:

string name = 1 [(nanopb).max_size = 40];

will generate the following C declaration:

char name[40];


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to