aboutsummaryrefslogtreecommitdiffstats
path: root/generator/nanopb_generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'generator/nanopb_generator.py')
-rwxr-xr-xgenerator/nanopb_generator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index 5c53a633..3e543942 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -1356,6 +1356,9 @@ def get_nanopb_suboptions(subdesc, options, name):
Globals.matched_namemasks.add(namemask)
new_options.MergeFrom(options)
+ if hasattr(subdesc, 'syntax') and subdesc.syntax == "proto3":
+ new_options.proto3 = True
+
# Handle options defined in .proto
if isinstance(subdesc.options, descriptor.FieldOptions):
ext_type = nanopb_pb2.nanopb