From 0848255d4a4b7fa032e962592b15c57b30cd8483 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 24 Oct 2013 08:44:59 +0300 Subject: Handle also longs in EncodedSize --- generator/nanopb_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)]) -- cgit 1.2.3-korg