summaryrefslogtreecommitdiffstats
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 4c01502c..7ee06523 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -587,6 +587,9 @@ class OneOf(Field):
self.name = oneof_desc.name
self.ctype = 'union'
self.fields = []
+ self.allocation = 'ONEOF'
+ self.default = None
+ self.rules = 'ONEOF'
def add_field(self, field):
if field.allocation == 'CALLBACK':