File tree Expand file tree Collapse file tree
supervisor/shared/translate Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434// Map MicroPython's error messages to our translations.
3535#if !defined(MICROPY_ENABLE_DYNRUNTIME ) || !MICROPY_ENABLE_DYNRUNTIME
3636#include "supervisor/shared/translate/compressed_string.h"
37- #define MP_COMPRESSED_ROM_TEXT (x ) MP_ERROR_TEXT(x)
3837
3938// MP_ERROR_TEXT() is a giant function with many strcmp calls. The assumption is
4039// that the build process will optimize this away and replace it with the
4847#else
4948// In link time optimized (LTO) builds, we can compile this once into a .o and
5049// at link time the calls will be optimized.
51- mp_rom_error_text_t MP_ERROR_TEXT (const char * c );
50+ mp_rom_error_text_t MP_COMPRESSED_ROM_TEXT (const char * c );
5251#endif
5352
5453#else
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ __attribute__((always_inline))
5050#endif
5151// Prevent instrumenting this because that disables the inlining we rely of for code size
5252// optimization.
53- __attribute__((no_instrument_function )) mp_rom_error_text_t translate (const char * original ) {
53+ __attribute__((no_instrument_function )) mp_rom_error_text_t MP_COMPRESSED_ROM_TEXT (const char * original ) {
5454 #ifndef NO_QSTR
5555 #define QDEF (id , hash , len , str )
5656 #define TRANSLATION (english_id , number ) if (strcmp(original, english_id) == 0) { return (mp_rom_error_text_t)&translation##number; } else
You can’t perform that action at this time.
0 commit comments