summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-12-26 12:32:33 +0000
committerDamien George <damien.p.george@gmail.com>2015-12-26 12:32:33 +0000
commit84b245f187f9711357b1fd46bebc67266bd028e5 (patch)
tree1df85f4a6a32cd2742ec0ff1690ff4afa919f7d9 /esp8266
parent7203b58e876cffe9bb7246e17c206e7b4280f701 (diff)
downloadmicropython-84b245f187f9711357b1fd46bebc67266bd028e5.tar.gz
micropython-84b245f187f9711357b1fd46bebc67266bd028e5.zip
lib/utils: Add pyexec_frozen_module to load and execute frozen module.
This is a convenience function similar to pyexec_file. It should be used instead of raw mp_parse_compile_execute because the latter does not catch and report exceptions.
Diffstat (limited to 'esp8266')
-rw-r--r--esp8266/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index 178ad8b7c2..051ff6f6e2 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -32,7 +32,6 @@
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
-#include "py/frozenmod.h"
#include "py/mphal.h"
#include "py/gc.h"
#include "lib/utils/pyexec.h"
@@ -49,8 +48,7 @@ STATIC void mp_reset(void) {
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_init(mp_sys_argv, 0);
#if MICROPY_MODULE_FROZEN
- mp_lexer_t *lex = mp_find_frozen_module("main", 4);
- mp_parse_compile_execute(lex, MP_PARSE_FILE_INPUT, mp_globals_get(), mp_locals_get());
+ pyexec_frozen_module("main");
#endif
}