diff options
| author | Damien George | 2014-04-13 12:52:39 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-13 12:52:39 +0100 |
| commit | 640e7e4779d5d6b5e53fa305e5fe824da7783090 (patch) | |
| tree | c299b3caf77aca8923a6fdb5554dd5a27ffc4c4e /stmhal/main.c | |
| parent | f95c68e53638aa363797595b0d618bbe08c56bb3 (diff) | |
| parent | 4165cd1c0cfc4eabf446be504787090be84a421b (diff) | |
Merge pull request #476 from pfalcon/static-sys
Convert sys module to static allocation
Diffstat (limited to 'stmhal/main.c')
| -rw-r--r-- | stmhal/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 29c704b10..efaf7caf9 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -263,10 +263,9 @@ soft_reset: // Micro Python init qstr_init(); mp_init(); - mp_obj_t def_path[2]; - def_path[0] = MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_); - def_path[1] = MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib); - mp_sys_path = mp_obj_new_list(2, def_path); + mp_obj_list_init(mp_sys_path, 0); + mp_obj_list_append(mp_sys_argv, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_)); + mp_obj_list_append(mp_sys_argv, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib)); readline_init(); |
