summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-12-26 17:43:38 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-12-26 17:43:38 +0200
commit980f899dd5ca1b4201536cdb56a723ba7777d82c (patch)
tree8520f46e4c7e9fef6033d2fe221b2d68481751a6 /generator
parent0f3c0f79bc83c3678c325f7e8e17dd031acaf77f (diff)
Include the field type in a comment for extension fields
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/nanopb_generator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index 19771a7a..6dcc911f 100755
--- 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'''