summaryrefslogtreecommitdiffstatshomepage
path: root/py/objmodule.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-08 17:33:12 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-08 17:33:12 +0000
commit38a2da68c2e02b8fc5ae308ca9e3b667f8a0aedc (patch)
tree8bf705c9aff2013e1949e5edd803893113d385d3 /py/objmodule.c
parentea9e441a75d7ea6633b0ea95b21667c48a6f7b6a (diff)
downloadmicropython-38a2da68c2e02b8fc5ae308ca9e3b667f8a0aedc.tar.gz
micropython-38a2da68c2e02b8fc5ae308ca9e3b667f8a0aedc.zip
py: Stuff qstr in object pointer; keys for mp_map_t are now always mp_obj_t.
Diffstat (limited to 'py/objmodule.c')
-rw-r--r--py/objmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objmodule.c b/py/objmodule.c
index 7b92b76f42..a5183b51e3 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -32,8 +32,8 @@ mp_obj_t mp_obj_new_module(qstr module_name) {
mp_obj_module_t *o = m_new_obj(mp_obj_module_t);
o->base.type = &module_type;
o->name = module_name;
- o->globals = mp_map_new(MP_MAP_QSTR, 1);
- mp_qstr_map_lookup(o->globals, MP_QSTR___name__, true)->value = mp_obj_new_str(module_name);
+ o->globals = mp_map_new(1);
+ mp_map_lookup(o->globals, MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_MAP_LOOKUP_ADD_IF_NOT_FOUND)->value = mp_obj_new_str(module_name);
return o;
}