revert incorrect translate() change

This commit is contained in:
Jeff Epler 2023-10-30 10:37:22 +01:00
parent 60755cc690
commit 8724b43e15
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -50,7 +50,7 @@ __attribute__((always_inline))
#endif #endif
// Prevent instrumenting this because that disables the inlining we rely of for code size // Prevent instrumenting this because that disables the inlining we rely of for code size
// optimization. // optimization.
__attribute__((no_instrument_function)) mp_rom_error_text_t MP_ERROR_TEXT(const char *original) { __attribute__((no_instrument_function)) mp_rom_error_text_t translate(const char *original) {
#ifndef NO_QSTR #ifndef NO_QSTR
#define QDEF(id, hash, len, str) #define QDEF(id, hash, len, str)
#define TRANSLATION(english_id, number) if (strcmp(original, english_id) == 0) { return (mp_rom_error_text_t)&translation##number; } else #define TRANSLATION(english_id, number) if (strcmp(original, english_id) == 0) { return (mp_rom_error_text_t)&translation##number; } else