diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-22 14:35:10 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-22 14:35:10 +0000 |
commit | 5fa93b67557f21c22a41449c3266571c427f6798 (patch) | |
tree | 3e009ed9369b7aba8cf5212509a784ecd86e06a3 /py/objtype.c | |
parent | 8ae1c1beacc56d440b2cc1e4bd010b100ad4fdd0 (diff) | |
download | micropython-5fa93b67557f21c22a41449c3266571c427f6798.tar.gz micropython-5fa93b67557f21c22a41449c3266571c427f6798.zip |
Second stage of qstr revamp: uPy str object can be qstr or not.
Diffstat (limited to 'py/objtype.c')
-rw-r--r-- | py/objtype.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objtype.c b/py/objtype.c index 5dea6938d7..75755f4fb9 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -251,7 +251,7 @@ static mp_obj_t type_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp // args[0] = name // args[1] = bases tuple // args[2] = locals dict - return mp_obj_new_type(mp_obj_get_qstr(args[0]), args[1], args[2]); + return mp_obj_new_type(mp_obj_str_get_str(args[0]), args[1], args[2]); default: nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "type takes at 1 or 3 arguments")); @@ -323,12 +323,12 @@ const mp_obj_type_t mp_const_type = { .store_attr = type_store_attr, }; -mp_obj_t mp_obj_new_type(qstr name, mp_obj_t bases_tuple, mp_obj_t locals_dict) { +mp_obj_t mp_obj_new_type(const char *name, mp_obj_t bases_tuple, mp_obj_t locals_dict) { assert(MP_OBJ_IS_TYPE(bases_tuple, &tuple_type)); // Micro Python restriction, for now assert(MP_OBJ_IS_TYPE(locals_dict, &dict_type)); // Micro Python restriction, for now mp_obj_type_t *o = m_new0(mp_obj_type_t, 1); o->base.type = &mp_const_type; - o->name = qstr_str(name); + o->name = name; o->print = class_print; o->make_new = class_make_new; o->binary_op = class_binary_op; |