@@ -181,7 +181,7 @@ void stop_mp(void) {
181
181
182
182
// Look for the first file that exists in the list of filenames, using mp_import_stat().
183
183
// Return its index. If no file found, return -1.
184
- const char * first_existing_file_in_list (const char * * filenames ) {
184
+ const char * first_existing_file_in_list (const char * const * filenames ) {
185
185
for (int i = 0 ; filenames [i ] != (char * )"" ; i ++ ) {
186
186
mp_import_stat_t stat = mp_import_stat (filenames [i ]);
187
187
if (stat == MP_IMPORT_STAT_FILE ) {
@@ -191,7 +191,7 @@ const char* first_existing_file_in_list(const char ** filenames) {
191
191
return NULL ;
192
192
}
193
193
194
- bool maybe_run_list (const char * * filenames , pyexec_result_t * exec_result ) {
194
+ bool maybe_run_list (const char * const * filenames , pyexec_result_t * exec_result ) {
195
195
const char * filename = first_existing_file_in_list (filenames );
196
196
if (filename == NULL ) {
197
197
return false;
@@ -256,9 +256,9 @@ bool run_code_py(safe_mode_t safe_mode) {
256
256
} else {
257
257
new_status_color (MAIN_RUNNING );
258
258
259
- static const char * supported_filenames [] = STRING_LIST ("code.txt" , "code.py" , "main.py" , "main.txt" );
259
+ static const char * const supported_filenames [] = STRING_LIST ("code.txt" , "code.py" , "main.py" , "main.txt" );
260
260
#if CIRCUITPY_FULL_BUILD
261
- static const char * double_extension_filenames [] = STRING_LIST ("code.txt.py" , "code.py.txt" , "code.txt.txt" ,"code.py.py" ,
261
+ static const char * const double_extension_filenames [] = STRING_LIST ("code.txt.py" , "code.py.txt" , "code.txt.txt" ,"code.py.py" ,
262
262
"main.txt.py" , "main.py.txt" , "main.txt.txt" ,"main.py.py" );
263
263
#endif
264
264
@@ -343,7 +343,7 @@ void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
343
343
// If not in safe mode, run boot before initing USB and capture output in a
344
344
// file.
345
345
if (filesystem_present () && safe_mode == NO_SAFE_MODE && MP_STATE_VM (vfs_mount_table ) != NULL ) {
346
- static const char * boot_py_filenames [] = STRING_LIST ("settings.txt" , "settings.py" , "boot.py" , "boot.txt" );
346
+ static const char * const boot_py_filenames [] = STRING_LIST ("settings.txt" , "settings.py" , "boot.py" , "boot.txt" );
347
347
348
348
new_status_color (BOOT_RUNNING );
349
349
0 commit comments