From: Petteri Aimonen Date: Thu, 24 Oct 2013 05:44:59 +0000 (+0300) Subject: Handle also longs in EncodedSize X-Git-Tag: 5.0.2~186^2~335 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=0848255d4a4b7fa032e962592b15c57b30cd8483;p=apps%2Fagl-service-can-low-level.git Handle also longs in EncodedSize --- diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 0f14a041..aa2c1b38 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -105,7 +105,7 @@ class EncodedSize: self.symbols = symbols def __add__(self, other): - if isinstance(other, int): + if isinstance(other, (int, long)): return EncodedSize(self.value + other, self.symbols) elif isinstance(other, (str, Names)): return EncodedSize(self.value, self.symbols + [str(other)])