Skip to content

Commit a61a9f4

Browse files
committed
Size reductions (attempts, at the very least)
1 parent f6e7edc commit a61a9f4

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

locale/circuitpython.pot

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ msgid ""
3535
"https://github.com/adafruit/circuitpython/issues\n"
3636
msgstr ""
3737

38-
#: main.c
39-
msgid ""
40-
"\n"
41-
"WARNING: "
42-
msgstr ""
43-
4438
#: py/obj.c
4539
msgid " File \"%q\""
4640
msgstr ""
@@ -2369,7 +2363,7 @@ msgid "Voltage read timed out"
23692363
msgstr ""
23702364

23712365
#: main.c
2372-
msgid "WARNING: Your code filename has two extensions\n"
2366+
msgid "WARNING: "
23732367
msgstr ""
23742368

23752369
#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c
@@ -2430,6 +2424,10 @@ msgid ""
24302424
"You pressed the reset button during boot. Press again to exit safe mode."
24312425
msgstr ""
24322426

2427+
#: main.c
2428+
msgid "Your code filename has two extensions\n"
2429+
msgstr ""
2430+
24332431
#: supervisor/shared/micropython.c
24342432
msgid "[truncated due to length]"
24352433
msgstr ""

main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,17 @@ STATIC vm_memory_t allocate_vm_memory(void) {
150150
// Check if value is valid
151151
pystack_size = pystack_size - pystack_size % sizeof(size_t); // Round down to multiple of 4.
152152
if (pystack_size < 384) {
153-
serial_write_compressed(translate("\nWARNING: "));
153+
serial_write("\n");
154+
serial_write_compressed(translate("WARNING: "));
154155
serial_write_compressed(translate("Invalid CIRCUITPY_PYSTACK_SIZE"));
155156
serial_write_compressed(translate(", defaulting back to build value.\n\n"));
156157
pystack_size = CIRCUITPY_PYSTACK_SIZE; // Reset
157158
}
158159
#endif
159160
res.pystack = allocate_memory(pystack_size, false, false);
160161
if (res.pystack == NULL) {
161-
serial_write_compressed(translate("\nWARNING: "));
162+
serial_write("\n");
163+
serial_write_compressed(translate("WARNING: "));
162164
serial_write_compressed(translate("Allocating pystack failed"));
163165
serial_write_compressed(translate(", defaulting back to build value.\n\n"));
164166
res.pystack = allocate_memory(CIRCUITPY_PYSTACK_SIZE, false, false);
@@ -469,7 +471,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
469471
if (!found_main) {
470472
found_main = maybe_run_list(double_extension_filenames, MP_ARRAY_SIZE(double_extension_filenames));
471473
if (found_main) {
472-
serial_write_compressed(translate("WARNING: Your code filename has two extensions\n"));
474+
serial_write_compressed(translate("WARNING: "));
475+
serial_write_compressed(translate("Your code filename has two extensions\n"));
473476
}
474477
}
475478
#else

0 commit comments

Comments
 (0)