summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-03 02:32:40 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-03 02:32:40 +0000
commit81ad89c46e5b53c7a0e91e56f972e43751ddeb3d (patch)
tree4666531311f8016461e7ce6b2d13b43b75a22ea7
parent4cb80582c4154f59118eab902872ab0c3a496303 (diff)
downloadmicropython-81ad89c46e5b53c7a0e91e56f972e43751ddeb3d.tar.gz
micropython-81ad89c46e5b53c7a0e91e56f972e43751ddeb3d.zip
untabified
-rw-r--r--py/objlist.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/py/objlist.c b/py/objlist.c
index b488a1964e..e3596a5c72 100644
--- a/py/objlist.c
+++ b/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