Include the field type in a comment for extension fields

This commit is contained in:
Petteri Aimonen
2014-12-26 17:43:38 +02:00
parent 0f3c0f79bc
commit 980f899dd5

View File

@@ -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'''