From 5a9f85b87615078868d3b394370a30b550186cce Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Mon, 22 Aug 2011 18:57:23 +0000 Subject: unittests, change to PB_LTYPE_BYTES data size git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9 --- generator/nanopb_generator.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'generator') 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,' -- cgit 1.2.3-korg