diff options
Diffstat (limited to 'generator')
-rwxr-xr-x | generator/nanopb_generator.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 64514577..9cf2de5f 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -1045,7 +1045,10 @@ class ProtoFile: else: yield '/* Generated by %s at %s. */\n\n' % (nanopb_version, time.asctime()) - symbol = make_identifier(headername) + if self.fdesc.package: + symbol = make_identifier(self.fdesc.package + '_' + headername) + else: + symbol = make_identifier(headername) yield '#ifndef PB_%s_INCLUDED\n' % symbol yield '#define PB_%s_INCLUDED\n' % symbol try: |