summaryrefslogtreecommitdiff
path: root/py/objarray.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-22 14:35:10 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-22 14:35:10 +0000
commit5fa93b67557f21c22a41449c3266571c427f6798 (patch)
tree3e009ed9369b7aba8cf5212509a784ecd86e06a3 /py/objarray.c
parent8ae1c1beacc56d440b2cc1e4bd010b100ad4fdd0 (diff)
Second stage of qstr revamp: uPy str object can be qstr or not.
Diffstat (limited to 'py/objarray.c')
-rw-r--r--py/objarray.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/py/objarray.c b/py/objarray.c
index 343a3f6e9..4f3656115 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -167,9 +167,11 @@ static mp_obj_t array_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const m
switch (n_args) {
case 2:
{
- const char *code = qstr_str(mp_obj_str_get(args[0]));
+ // TODO check args
+ uint l;
+ const byte *s = mp_obj_str_get_data(args[0], &l);
mp_obj_t initializer = args[1];
- return array_construct(*code, initializer);
+ return array_construct(*s, initializer);
}
default: