diff options
| author | Dan Halbert <halbert@adafruit.com> | 2020-05-28 21:37:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-28 21:37:45 -0400 |
| commit | 6ace4ee7e834eb5960876f2c6e75febb3760f9cf (patch) | |
| tree | f43869d72d6a09505d50fa0edece55d6bc9b45cc /py/obj.c | |
| parent | d98151a434106f54dc267b387e19f7ee6c512332 (diff) | |
| parent | d0f9b5901e37a751a0bf5770c2f26a5c6c039dd4 (diff) | |
Merge pull request #2968 from jepler/more-efficient-translation
More efficient translation
Diffstat (limited to 'py/obj.c')
| -rw-r--r-- | py/obj.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -94,17 +94,17 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) { assert(n % 3 == 0); // Decompress the format strings const compressed_string_t* traceback = translate("Traceback (most recent call last):\n"); - char decompressed[traceback->length]; + char decompressed[decompress_length(traceback)]; decompress(traceback, decompressed); #if MICROPY_ENABLE_SOURCE_LINE const compressed_string_t* frame = translate(" File \"%q\", line %d"); #else const compressed_string_t* frame = translate(" File \"%q\""); #endif - char decompressed_frame[frame->length]; + char decompressed_frame[decompress_length(frame)]; decompress(frame, decompressed_frame); const compressed_string_t* block_fmt = translate(", in %q\n"); - char decompressed_block[block_fmt->length]; + char decompressed_block[decompress_length(block_fmt)]; decompress(block_fmt, decompressed_block); // Print the traceback |
