diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-27 09:54:12 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-03 21:23:13 +0000 |
commit | d891452a73165966497f1c79b64276faaa664597 (patch) | |
tree | 6a04e942861bbcb6a7321dffd65895f3a38056a7 /py/objarray.c | |
parent | e104acdb8ccd53963f5415edc8c9ab88aeca771a (diff) | |
download | micropython-d891452a73165966497f1c79b64276faaa664597.tar.gz micropython-d891452a73165966497f1c79b64276faaa664597.zip |
py: Add MICROPY_MALLOC_USES_ALLOCATED_SIZE to allow simpler malloc API.
Diffstat (limited to 'py/objarray.c')
-rw-r--r-- | py/objarray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objarray.c b/py/objarray.c index e030548bbb..e3a59a0f89 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -373,7 +373,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value if (len_adj > 0) { if (len_adj > o->free) { // TODO: alloc policy; at the moment we go conservative - o->items = m_realloc(o->items, (o->len + o->free) * item_sz, (o->len + len_adj) * item_sz); + o->items = m_renew(byte, o->items, (o->len + o->free) * item_sz, (o->len + len_adj) * item_sz); o->free = 0; } mp_seq_replace_slice_grow_inplace(o->items, o->len, |