From 46bd12d57e1eb96ba1aa182c618950161f84f9b0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 7 Apr 2014 03:07:21 +0300 Subject: [PATCH] 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. --- py/objset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));