Code Review
/
apps
/
agl-service-can-low-level.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
0f3c0f7
)
Include the field type in a comment for extension fields
author
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Fri, 26 Dec 2014 15:43:38 +0000
(17:43 +0200)
committer
Petteri Aimonen
<jpa@git.mail.kapsi.fi>
Fri, 26 Dec 2014 15:43:38 +0000
(17:43 +0200)
generator/nanopb_generator.py
patch
|
blob
|
history
diff --git
a/generator/nanopb_generator.py
b/generator/nanopb_generator.py
index
19771a7
..
6dcc911
100755
(executable)
--- a/
generator/nanopb_generator.py
+++ b/
generator/nanopb_generator.py
@@
-498,7
+498,8
@@
class ExtensionField(Field):
msg +=' type of extension fields is currently supported. */\n'
return msg
- return 'extern const pb_extension_type_t %s;\n' % self.fullname
+ return ('extern const pb_extension_type_t %s; /* field type: %s */\n' %
+ (self.fullname, str(self).strip()))
def extension_def(self):
'''Definition of the extension type in the .pb.c file'''