Add generator option for packed structs.

Usage is:
message Foo
{
   option (nanopb_msgopt).packed_struct = true;
   ...
}

Valid also in file scope.

Update issue 49
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2013-01-10 17:32:27 +02:00
parent 93ffe14a0a
commit d2c1604d6d
5 changed files with 31 additions and 6 deletions

View File

@@ -25,6 +25,9 @@ message NanoPBOptions {
// Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];
// Add 'packed' attribute to generated structs.
optional bool packed_struct = 5 [default = false];
}
// Protocol Buffers extension number registry