unsigned char l_slot = mas_offset(l_mas);
unsigned char r_slot = mas_offset(r_mas);
unsigned char cp_r_slot = r_slot;
- void *content = mas_get_slot(l_mas, l_slot);
unsigned long range_max = mas_safe_pivot(r_mas, r_slot);
unsigned long range_min = l_mas->min;
+ void **slots = ma_get_slots(mte_to_node(l_mas->node),
+ mte_node_type(l_mas->node));
+ void *content = slots[l_slot];
if (l_slot)
range_min = mas_safe_pivot(l_mas, l_slot - 1) + 1;
l_mas->index = range_min;
if ((l_mas->index == range_min) &&
- l_slot && !mas_get_slot(l_mas, l_slot - 1)) {
+ l_slot && !slots[l_slot - 1]) {
if (l_slot > 1)
l_mas->index = mas_safe_pivot(l_mas, l_slot - 2) + 1;
else
mas_set_offset(l_mas, l_slot - 1);
}
- if (!mas_get_slot(r_mas, r_slot)) {
+ slots = ma_get_slots(mte_to_node(r_mas->node),
+ mte_node_type(r_mas->node));
+ if (!slots[r_slot]) {
if (r_mas->last < range_max)
r_mas->last = range_max;
cp_r_slot++;
}
if (r_mas->last == range_max &&
- r_mas->last < r_mas->max && !mas_get_slot(r_mas, r_slot + 1)) {
+ r_mas->last < r_mas->max && !slots[r_slot + 1]) {
r_mas->last = mas_safe_pivot(r_mas, r_slot + 1);
cp_r_slot++;
}