Skip to content

Commit 0c59db1

Browse files
committed
Use qstr id to create sys module.
1 parent 7cd54d7 commit 0c59db1

4 files changed

Lines changed: 2 additions & 3 deletions

File tree

py/qstrdefs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Q(set)
8181
Q(sorted)
8282
Q(sum)
8383
Q(str)
84+
Q(sys)
8485
Q(tuple)
8586
Q(type)
8687
Q(zip)

py/runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void rt_init(void) {
168168

169169
#if MICROPY_CPYTHON_COMPAT
170170
// Precreate sys module, so "import sys" didn't throw exceptions.
171-
mp_obj_new_module(QSTR_FROM_STR_STATIC("sys"));
171+
mp_obj_new_module(MP_QSTR_sys);
172172
#endif
173173

174174
mp_module_micropython_init();

unix/qstrdefsport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// qstrs specific to this port
22

3-
Q(sys)
43
Q(argv)
54
Q(open)
65
Q(stdin)

windows/qstrdefsport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// qstrs specific to this port
22

3-
Q(sys)
43
Q(argv)
54
Q(open)
65
Q(stdin)

0 commit comments

Comments
 (0)