summaryrefslogtreecommitdiffstatshomepage
path: root/shared/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'shared/runtime')
-rw-r--r--shared/runtime/pyexec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c
index 006ec096f7..2dceb647c3 100644
--- a/shared/runtime/pyexec.c
+++ b/shared/runtime/pyexec.c
@@ -674,7 +674,7 @@ int pyexec_file(const char *filename) {
int pyexec_file_if_exists(const char *filename) {
#if MICROPY_MODULE_FROZEN
- if (mp_frozen_stat(filename) == MP_IMPORT_STAT_FILE) {
+ if (mp_find_frozen_module(filename, NULL, NULL) == MP_IMPORT_STAT_FILE) {
return pyexec_frozen_module(filename);
}
#endif
@@ -687,7 +687,8 @@ int pyexec_file_if_exists(const char *filename) {
#if MICROPY_MODULE_FROZEN
int pyexec_frozen_module(const char *name) {
void *frozen_data;
- int frozen_type = mp_find_frozen_module(name, strlen(name), &frozen_data);
+ int frozen_type;
+ mp_find_frozen_module(name, &frozen_type, &frozen_data);
switch (frozen_type) {
#if MICROPY_MODULE_FROZEN_STR