1 parent bb33cc6 commit f477bfbCopy full SHA for f477bfb
1 file changed
py/runtime.c
@@ -155,8 +155,11 @@ void rt_init(void) {
155
#if MICROPY_CPYTHON_COMPAT
156
// Add (empty) micropython module, so it was possible to "import micropython",
157
// which can be a placeholder module on CPython.
158
- mp_obj_t m = mp_obj_new_module(qstr_from_str_static("micropython"));
159
- rt_store_name(qstr_from_str_static("micropython"), m);
+ mp_obj_t m_mp = mp_obj_new_module(qstr_from_str_static("micropython"));
+ rt_store_name(qstr_from_str_static("micropython"), m_mp);
160
+
161
+ mp_obj_t m_sys = mp_obj_new_module(qstr_from_str_static("sys"));
162
+ rt_store_name(qstr_from_str_static("sys"), m_sys);
163
#endif
164
165
next_unique_code_id = 1; // 0 indicates "no code"
0 commit comments