untabified
This commit is contained in:
parent
4cb80582c4
commit
81ad89c46e
24
py/objlist.c
24
py/objlist.c
@ -46,18 +46,18 @@ static mp_obj_t list_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
|
||||
}
|
||||
case RT_BINARY_OP_ADD:
|
||||
{
|
||||
if (!MP_OBJ_IS_TYPE(rhs, &list_type)) {
|
||||
return NULL;
|
||||
}
|
||||
mp_obj_list_t *p = rhs;
|
||||
mp_obj_list_t *s = list_new(o->len + p->len);
|
||||
for (int i = 0; i < o->len; i++) {
|
||||
s->items[i] = o->items[i];
|
||||
}
|
||||
for (int i = 0; i < p->len; i++) {
|
||||
s->items[i+o->len] = p->items[i];
|
||||
}
|
||||
return s;
|
||||
if (!MP_OBJ_IS_TYPE(rhs, &list_type)) {
|
||||
return NULL;
|
||||
}
|
||||
mp_obj_list_t *p = rhs;
|
||||
mp_obj_list_t *s = list_new(o->len + p->len);
|
||||
for (int i = 0; i < o->len; i++) {
|
||||
s->items[i] = o->items[i];
|
||||
}
|
||||
for (int i = 0; i < p->len; i++) {
|
||||
s->items[i+o->len] = p->items[i];
|
||||
}
|
||||
return s;
|
||||
}
|
||||
default:
|
||||
// op not supported
|
||||
|
Loading…
Reference in New Issue
Block a user