From 8d12fecc7e4fb6899eb0d013abe0d6a5e03447ce Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sun, 11 Jan 2015 19:38:05 +0200 Subject: 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. --- generator/proto/nanopb.proto | 3 +++ 1 file changed, 3 insertions(+) (limited to 'generator/proto') diff --git a/generator/proto/nanopb.proto b/generator/proto/nanopb.proto index e830ec2c..a1b24936 100644 --- a/generator/proto/nanopb.proto +++ b/generator/proto/nanopb.proto @@ -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 -- cgit 1.2.3-korg