diff --git a/micropython/modules/jpegdec/jpegdec.cpp b/micropython/modules/jpegdec/jpegdec.cpp index 75741421..b6e22403 100644 --- a/micropython/modules/jpegdec/jpegdec.cpp +++ b/micropython/modules/jpegdec/jpegdec.cpp @@ -43,7 +43,7 @@ void *jpegdec_open_callback(const char *filename, int32_t *size) { mp_obj_t args[2] = { fn, - MP_OBJ_NEW_QSTR(MP_QSTR_r), + MP_ROM_QSTR(MP_QSTR_r), }; // Stat the file to get its size diff --git a/micropython/modules/pngdec/pngdec.cpp b/micropython/modules/pngdec/pngdec.cpp index 45dc9b70..5db3efda 100644 --- a/micropython/modules/pngdec/pngdec.cpp +++ b/micropython/modules/pngdec/pngdec.cpp @@ -53,7 +53,7 @@ void *pngdec_open_callback(const char *filename, int32_t *size) { mp_obj_t args[2] = { fn, - MP_OBJ_NEW_QSTR(MP_QSTR_r), + MP_ROM_QSTR(MP_QSTR_r), }; // Stat the file to get its size