diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-22 18:57:23 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-22 18:57:23 +0000 |
commit | 5a9f85b87615078868d3b394370a30b550186cce (patch) | |
tree | fd2b911a5708f341fcf2b839d05e8e5653bd99ab /generator | |
parent | 494fbd91e4e5574a4cf8dbe69b3f80a08e97e85b (diff) |
unittests, change to PB_LTYPE_BYTES data size
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'generator')
-rw-r--r-- | 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 a6d38c0..2826851 100644 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -218,6 +218,9 @@ class Field: result += '\n pb_membersize(%s, %s[0]),' % (self.struct_name, self.name) result += ('\n pb_membersize(%s, %s) / pb_membersize(%s, %s[0]),' % (self.struct_name, self.name, self.struct_name, self.name)) + elif self.ltype == 'PB_LTYPE_BYTES': + result += '\n pb_membersize(%s, bytes),' % self.ctype + result += ' 0,' else: result += '\n pb_membersize(%s, %s),' % (self.struct_name, self.name) result += ' 0,' |