mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
py: Only search frozen modules when '.frozen' is found in sys.path.
This changes makemanifest.py & mpy-tool.py to merge string and mpy names into the same list (now mp_frozen_names). The various paths for loading a frozen module (mp_find_frozen_module) and checking existence of a frozen module (mp_frozen_stat) use a common function that searches this list. In addition, the frozen lookup will now only take place if the path starts with ".frozen", which needs to be added to sys.path. This fixes issues #1804, #2322, #3509, #6419. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
f853e3e106
commit
e0bf4611c3
@@ -35,8 +35,6 @@ enum {
|
||||
MP_FROZEN_MPY,
|
||||
};
|
||||
|
||||
int mp_find_frozen_module(const char *str, size_t len, void **data);
|
||||
const char *mp_find_frozen_str(const char *str, size_t *len);
|
||||
mp_import_stat_t mp_frozen_stat(const char *str);
|
||||
mp_import_stat_t mp_find_frozen_module(const char *str, int *frozen_type, void **data);
|
||||
|
||||
#endif // MICROPY_INCLUDED_PY_FROZENMOD_H
|
||||
|
||||
Reference in New Issue
Block a user