summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-04 07:55:10 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-04 19:36:00 +0200
commit0c59db1973cf4acf9d2582c889a5c58784ec1d31 (patch)
tree2cfb6cccd39e85957aebf1eae0074ebc060e9940
parent7cd54d79db8abd4bd5c3a964f8096de4f7734b23 (diff)
downloadmicropython-0c59db1973cf4acf9d2582c889a5c58784ec1d31.tar.gz
micropython-0c59db1973cf4acf9d2582c889a5c58784ec1d31.zip
Use qstr id to create sys module.
-rw-r--r--py/qstrdefs.h1
-rw-r--r--py/runtime.c2
-rw-r--r--unix/qstrdefsport.h1
-rw-r--r--windows/qstrdefsport.h1
4 files changed, 2 insertions, 3 deletions
diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index 7efa85b8a5..bf575e25d1 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -81,6 +81,7 @@ Q(set)
Q(sorted)
Q(sum)
Q(str)
+Q(sys)
Q(tuple)
Q(type)
Q(zip)
diff --git a/py/runtime.c b/py/runtime.c
index 0f27273273..c84a28e4cb 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -168,7 +168,7 @@ void rt_init(void) {
#if MICROPY_CPYTHON_COMPAT
// Precreate sys module, so "import sys" didn't throw exceptions.
- mp_obj_new_module(QSTR_FROM_STR_STATIC("sys"));
+ mp_obj_new_module(MP_QSTR_sys);
#endif
mp_module_micropython_init();
diff --git a/unix/qstrdefsport.h b/unix/qstrdefsport.h
index a470e5dab0..598f23bef2 100644
--- a/unix/qstrdefsport.h
+++ b/unix/qstrdefsport.h
@@ -1,6 +1,5 @@
// qstrs specific to this port
-Q(sys)
Q(argv)
Q(open)
Q(stdin)
diff --git a/windows/qstrdefsport.h b/windows/qstrdefsport.h
index 8a4c47f0b5..3c69a1cb35 100644
--- a/windows/qstrdefsport.h
+++ b/windows/qstrdefsport.h
@@ -1,6 +1,5 @@
// qstrs specific to this port
-Q(sys)
Q(argv)
Q(open)
Q(stdin)