From 980f899dd5ca1b4201536cdb56a723ba7777d82c Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Fri, 26 Dec 2014 17:43:38 +0200 Subject: Include the field type in a comment for extension fields --- generator/nanopb_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'generator') 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''' -- cgit 1.2.3-korg