New generator options for oneofs: allow skipping or generating as normal 'optional' fields.

The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier.
This commit is contained in:
Petteri Aimonen
2015-01-11 19:38:05 +02:00
parent 8ef0392231
commit 8d12fecc7e
3 changed files with 42 additions and 10 deletions

View File

@@ -53,6 +53,9 @@ message NanoPBOptions {
// Skip this message
optional bool skip_message = 6 [default = false];
// Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];
}
// Extensions to protoc 'Descriptor' type in order to define options