diff options
author | Damien George <damien.p.george@gmail.com> | 2020-04-13 14:52:10 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-14 22:13:11 +1000 |
commit | 2725a791929f901c692d09f0afe7cc6a700384d5 (patch) | |
tree | 4c2942360d6ef0831158056538f84d8b7100abb0 /py/objexcept.c | |
parent | 5f0661b4fe6a68c38e9eecd94845f4bd1ed3046a (diff) |
py: Always give noop defines when MICROPY_ROM_TEXT_COMPRESSION disabled.
This commit provides a typedef for mp_rom_error_text_t, and a macro define
for MP_COMPRESSED_ROM_TEXT, when MICROPY_ROM_TEXT_COMPRESSION is disabled.
This simplifies the configuration (it no longer has a special case for
MICROPY_ENABLE_DYNRUNTIME) and makes it work for other cases that don't use
compression (eg examples/embedding). This commit also ensures
MICROPY_ROM_TEXT_COMPRESSION is defined during qstr processing.
Diffstat (limited to 'py/objexcept.c')
-rw-r--r-- | py/objexcept.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/py/objexcept.c b/py/objexcept.c index 59a0557b1..517427ed7 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -38,8 +38,9 @@ #include "py/gc.h" #include "py/mperrno.h" -// Extract the MP_MAX_UNCOMPRESSED_TEXT_LEN macro from "genhdr/compressed.data.h" -#if MICROPY_ROM_TEXT_COMPRESSION +#if MICROPY_ROM_TEXT_COMPRESSION && !defined(NO_QSTR) +// Extract the MP_MAX_UNCOMPRESSED_TEXT_LEN macro from "genhdr/compressed.data.h". +// Only need this if compression enabled and in a regular build (i.e. not during QSTR extraction). #define MP_MATCH_COMPRESSED(...) // Ignore #define MP_COMPRESSED_DATA(...) // Ignore #include "genhdr/compressed.data.h" |