PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
return &(((XINVLIST*) SvANY(invlist))->is_offset);
}
PERL_ARGS_ASSERT__INVLIST_LEN;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
return (SvCUR(invlist) == 0)
? 0
: FROM_INTERNAL_SIZE(SvCUR(invlist)) - *get_invlist_offset_addr(invlist);
PERL_ARGS_ASSERT_INVLIST_SET_LEN;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
SvCUR_set(invlist,
(len == 0)
? 0
PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
return &(((XINVLIST*) SvANY(invlist))->prev_index);
}
PERL_ARGS_ASSERT_INVLIST_MAX;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
/* Assumes worst case, in which the 0 element is not counted in the
* inversion list, so subtracts 1 for that */
return SvLEN(invlist) == 0 /* This happens under _new_invlist_C_array */
PERL_ARGS_ASSERT_INVLIST_EXTEND;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
/* Add one to account for the zero element at the beginning which may not
* be counted by the calling parameters */
SvGROW((SV *)invlist, TO_INTERNAL_SIZE(new_max + 1));
{
PERL_ARGS_ASSERT_INVLIST_TRIM;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
/* Change the length of the inversion list to how many entries it currently
* has */
SvPV_shrink_to_cur((SV *) invlist);
PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR;
+ assert(SvTYPE(invlist) == SVt_INVLIST);
+
return &(((XINVLIST*) SvANY(invlist))->iterator);
}