{
struct maple_node *child;
struct maple_enode *oldchild, *echild;
- unsigned char slot, end = mt_slot_count(mas->node);
+ unsigned char offset, end = mt_slot_count(mas->node);
int allocated = mas_alloc_cnt(mas);
+ void **slots = ma_get_slots(mte_to_node(mas->node),
+ mte_node_type(mas->node));
if (allocated < end) {
mas->span_enode = mas->node;
}
- for(slot = 0; slot < end; slot++) {
- oldchild = mas_get_slot(mas, slot);
+ for(offset = 0; offset < end; offset++) {
+ oldchild = slots[offset];
if (!oldchild)
return;
child = mas_next_alloc(mas);
echild = mt_mk_node(child, mte_node_type(oldchild));
- mte_set_slot(mas->node, slot, echild);
+ slots[offset] = echild;
memcpy(child, mte_to_node(oldchild), sizeof(struct maple_node));
}
}