Skip to content

Commit c75427b

Browse files
committed
py: Revert change to allocation policy for mp_set_t.
Seems that this fixes all set tests.
1 parent 07e24a6 commit c75427b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ mp_map_elem_t* mp_map_lookup(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t
197197
/* set */
198198

199199
void mp_set_init(mp_set_t *set, int n) {
200-
set->alloc = n;
200+
set->alloc = get_doubling_prime_greater_or_equal_to(n + 1);
201201
set->used = 0;
202202
set->table = m_new0(mp_obj_t, set->alloc);
203203
}

0 commit comments

Comments
 (0)