summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-10-24 08:44:59 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-10-24 08:44:59 +0300
commit0848255d4a4b7fa032e962592b15c57b30cd8483 (patch)
treef91d5c4cb8e62975835ab9a8cbd1c68cc3124093 /generator
parent51f0e47295d537a113804f250cddef37a57237a8 (diff)
Handle also longs in EncodedSize
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/nanopb_generator.py2
1 files changed, 1 insertions, 1 deletions
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)])