diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-08-18 20:49:48 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-08-18 20:49:48 +0300 |
commit | 62b4a8ecaac45ce62cc93e09261d60e6ceade1a9 (patch) | |
tree | 5f4a2c5977c8dac7962f2138663e7c3887c6c9e7 /generator/nanopb_generator.py | |
parent | 1dd9f1900fca0c137324c05a9421f1ba180b2470 (diff) |
Rename UNUSED() and STATIC_ASSERT() macros with PB_ prefix.
This avoids possible namespace conflicts with other macros.
Diffstat (limited to 'generator/nanopb_generator.py')
-rwxr-xr-x | generator/nanopb_generator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 88e9798d..80fb93ca 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -908,7 +908,7 @@ def generate_source(headername, enums, messages, extensions, options): yield ' * numbers or field sizes that are larger than what can fit in 8 or 16 bit\n' yield ' * field descriptors.\n' yield ' */\n' - yield 'STATIC_ASSERT((%s), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_%s)\n'%(assertion,msgs) + yield 'PB_STATIC_ASSERT((%s), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_%s)\n'%(assertion,msgs) yield '#endif\n\n' if worst < 65536: @@ -925,7 +925,7 @@ def generate_source(headername, enums, messages, extensions, options): yield ' * numbers or field sizes that are larger than what can fit in the default\n' yield ' * 8 bit descriptors.\n' yield ' */\n' - yield 'STATIC_ASSERT((%s), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_%s)\n'%(assertion,msgs) + yield 'PB_STATIC_ASSERT((%s), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_%s)\n'%(assertion,msgs) yield '#endif\n\n' # Add check for sizeof(double) @@ -941,7 +941,7 @@ def generate_source(headername, enums, messages, extensions, options): yield ' * These are not directly supported by nanopb, but see example_avr_double.\n' yield ' * To get rid of this error, remove any double fields from your .proto.\n' yield ' */\n' - yield 'STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)\n' + yield 'PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)\n' yield '\n' |