File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
supervisor/shared/translate Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 34
34
// Map MicroPython's error messages to our translations.
35
35
#if !defined(MICROPY_ENABLE_DYNRUNTIME ) || !MICROPY_ENABLE_DYNRUNTIME
36
36
#include "supervisor/shared/translate/compressed_string.h"
37
- #define MP_COMPRESSED_ROM_TEXT (x ) MP_ERROR_TEXT(x)
38
37
39
38
// MP_ERROR_TEXT() is a giant function with many strcmp calls. The assumption is
40
39
// that the build process will optimize this away and replace it with the
48
47
#else
49
48
// In link time optimized (LTO) builds, we can compile this once into a .o and
50
49
// 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 );
52
51
#endif
53
52
54
53
#else
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ __attribute__((always_inline))
50
50
#endif
51
51
// Prevent instrumenting this because that disables the inlining we rely of for code size
52
52
// 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 ) {
54
54
#ifndef NO_QSTR
55
55
#define QDEF (id , hash , len , str )
56
56
#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