Code Review
/
apps
/
low-level-can-service.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
51f0e47
)
Handle also longs in EncodedSize
author
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 24 Oct 2013 05:44:59 +0000
(08:44 +0300)
committer
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Thu, 24 Oct 2013 05:44:59 +0000
(08:44 +0300)
generator/nanopb_generator.py
patch
|
blob
|
history
diff --git
a/generator/nanopb_generator.py
b/generator/nanopb_generator.py
index
0f14a04
..
aa2c1b3
100755
(executable)
--- 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)])