diff options
| author | Damien <damien.p.george@gmail.com> | 2013-12-29 19:33:23 +0000 | 
|---|---|---|
| committer | Damien <damien.p.george@gmail.com> | 2013-12-29 19:33:23 +0000 | 
| commit | 732407f1bf12364375162e8fb73816532a5d139c (patch) | |
| tree | bf795d7bab01d6d603eec761affac7091be9606a /py/objlist.c | |
| parent | a1c8e5737cebba08909104d47c1dfd16ef80e6a1 (diff) | |
Change memory allocation API to require size for free and realloc.
Diffstat (limited to 'py/objlist.c')
| -rw-r--r-- | py/objlist.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/py/objlist.c b/py/objlist.c index 4d70c37eb..ce16ab6fe 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -57,8 +57,8 @@ mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg) {      assert(MP_OBJ_IS_TYPE(self_in, &list_type));      mp_obj_list_t *self = self_in;      if (self->len >= self->alloc) { +        self->items = m_renew(mp_obj_t, self->items, self->alloc, self->alloc * 2);          self->alloc *= 2; -        self->items = m_renew(mp_obj_t, self->items, self->alloc);      }      self->items[self->len++] = arg;      return mp_const_none; // return None, as per CPython | 
