summaryrefslogtreecommitdiffstatshomepage
path: root/py/objset.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-07 03:07:21 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-07 03:08:46 +0300
commit46bd12d57e1eb96ba1aa182c618950161f84f9b0 (patch)
tree0155d573890851341e6cb6d0fda98f12fd0c81a3 /py/objset.c
parent4d2238d2cedafd9eb04fe01986df34bc099e80e4 (diff)
downloadmicropython-46bd12d57e1eb96ba1aa182c618950161f84f9b0.tar.gz
micropython-46bd12d57e1eb96ba1aa182c618950161f84f9b0.zip
objset: Fix incorrect workaround against mp_set_init() munging alloc size.
No longer needed after recent change which guarantees that mp_set_init() will allocate exact number of slots requested.
Diffstat (limited to 'py/objset.c')
-rw-r--r--py/objset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objset.c b/py/objset.c
index 9a7e6751f5..448f484d5a 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -128,7 +128,7 @@ STATIC mp_obj_t set_copy(mp_obj_t self_in) {
mp_obj_set_t *other = m_new_obj(mp_obj_set_t);
other->base.type = &mp_type_set;
- mp_set_init(&other->set, self->set.alloc - 1);
+ mp_set_init(&other->set, self->set.alloc);
other->set.used = self->set.used;
memcpy(other->set.table, self->set.table, self->set.alloc * sizeof(mp_obj_t));