aboutsummaryrefslogtreecommitdiffstats
path: root/generator/nanopb.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-10 17:32:27 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-10 17:32:27 +0200
commitd2c1604d6d239cdab6b21f3daf6634eb112ae318 (patch)
treeb17e5aabb6d06f1cf7780ffb856016e86c7d3a67 /generator/nanopb.proto
parent93ffe14a0ae32eeda8275f48106e76ecc650168d (diff)
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
Diffstat (limited to 'generator/nanopb.proto')
-rw-r--r--generator/nanopb.proto3
1 files changed, 3 insertions, 0 deletions
diff --git a/generator/nanopb.proto b/generator/nanopb.proto
index 94ce7d9c..b9100abd 100644
--- a/generator/nanopb.proto
+++ b/generator/nanopb.proto
@@ -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