diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-02-26 17:33:36 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-02-26 17:33:36 +0200 |
commit | 4a6580726ec2a0b71d8f01133d5c38a469eac497 (patch) | |
tree | e2c8f2e32f000b7d4a4c25d4517ad311da04633f /generator/nanopb_generator.py | |
parent | 651e97456b24524a73070c6ea1c9c2696c02bd53 (diff) |
Fix generator error when long_names:false is combined with Oneofs.
Update issue 147
Status: FixedInGit
Diffstat (limited to 'generator/nanopb_generator.py')
-rwxr-xr-x | generator/nanopb_generator.py | 3 |
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': |