Skip to content

Commit

Permalink
objset: Fix incorrect workaround against mp_set_init() munging alloc …
Browse files Browse the repository at this point in the history
…size.

No longer needed after recent change which guarantees that mp_set_init()
will allocate exact number of slots requested.
  • Loading branch information
pfalcon committed Apr 7, 2014
1 parent 4d2238d commit 46bd12d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/objset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 46bd12d

Please sign in to comment.