summaryrefslogtreecommitdiffstatshomepage
path: root/unix/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/file.c')
-rw-r--r--unix/file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/file.c b/unix/file.c
index a14f5895b8..3181c08b69 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -6,7 +6,7 @@
#include "nlr.h"
#include "misc.h"
#include "mpconfig.h"
-#include "mpqstr.h"
+#include "qstr.h"
#include "obj.h"
#include "runtime.h"
#include "stream.h"
@@ -129,10 +129,10 @@ mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args) {
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_open_obj, 1, 2, mp_builtin_open);
void file_init() {
- rt_store_name(qstr_from_str_static("open"), (mp_obj_t)&mp_builtin_open_obj);
+ rt_store_name(MP_QSTR_open, (mp_obj_t)&mp_builtin_open_obj);
- mp_obj_t m_sys = mp_obj_new_module(qstr_from_str_static("sys"));
- rt_store_attr(m_sys, qstr_from_str_static("stdin"), fdfile_new(STDIN_FILENO));
- rt_store_attr(m_sys, qstr_from_str_static("stdout"), fdfile_new(STDOUT_FILENO));
- rt_store_attr(m_sys, qstr_from_str_static("stderr"), fdfile_new(STDERR_FILENO));
+ mp_obj_t m_sys = mp_obj_new_module(MP_QSTR_sys);
+ rt_store_attr(m_sys, MP_QSTR_stdin, fdfile_new(STDIN_FILENO));
+ rt_store_attr(m_sys, MP_QSTR_stdout, fdfile_new(STDOUT_FILENO));
+ rt_store_attr(m_sys, MP_QSTR_stderr, fdfile_new(STDERR_FILENO));
}