#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-#define INVLIST_LEN_OFFSET 0 /* Number of elements in the inversion list */
-#define INVLIST_ITER_OFFSET 1 /* Current iteration position */
+#define INVLIST_LEN_OFFSET 0 /* Number of elements in the inversion list */
+#define INVLIST_ITER_OFFSET 1 /* Current iteration position */
#define INVLIST_PREVIOUS_INDEX_OFFSET 2 /* Place to cache index of previous
- result */
+ result */
/* This is a combination of a version and data structure type, so that one
* being passed in can be validated to be an inversion list of the correct
/* For safety, when adding new elements, remember to #undef them at the end of
* the inversion list code section */
-#define INVLIST_ZERO_OFFSET 4 /* 0 or 1; must be last element in header */
+#define INVLIST_ZERO_OFFSET 4 /* 0 or 1; must be last element in header */
/* The UV at position ZERO contains either 0 or 1. If 0, the inversion list
* contains the code point U+00000, and begins here. If 1, the inversion list
* doesn't contain U+0000, and it begins at the next UV in the array.
PERL_STATIC_INLINE UV*
S__get_invlist_len_addr(pTHX_ SV* invlist)
{
- /* Return the address of the UV that contains the current number
- * of used elements in the inversion list */
+ /* Return the address of the UV that contains the current number
+ * of used elements in the inversion list */
- PERL_ARGS_ASSERT__GET_INVLIST_LEN_ADDR;
+ PERL_ARGS_ASSERT__GET_INVLIST_LEN_ADDR;
- return (UV *) (SvPVX(invlist) + (INVLIST_LEN_OFFSET * sizeof (UV)));
+ return (UV *) (SvPVX(invlist) + (INVLIST_LEN_OFFSET * sizeof (UV)));
}
PERL_STATIC_INLINE UV
S__invlist_len(pTHX_ SV* const invlist)
{
- /* Returns the current number of elements stored in the inversion list's
- * array */
+ /* Returns the current number of elements stored in the inversion list's
+ * array */
- PERL_ARGS_ASSERT__INVLIST_LEN;
+ PERL_ARGS_ASSERT__INVLIST_LEN;
- return *_get_invlist_len_addr(invlist);
+ return *_get_invlist_len_addr(invlist);
}
PERL_STATIC_INLINE bool
S__invlist_contains_cp(pTHX_ SV* const invlist, const UV cp)
{
- /* Does <invlist> contain code point <cp> as part of the set? */
+ /* Does <invlist> contain code point <cp> as part of the set? */
- IV index = _invlist_search(invlist, cp);
+ IV index = _invlist_search(invlist, cp);
- PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP;
+ PERL_ARGS_ASSERT__INVLIST_CONTAINS_CP;
- return index >= 0 && ELEMENT_RANGE_MATCHES_INVLIST(index);
+ return index >= 0 && ELEMENT_RANGE_MATCHES_INVLIST(index);
}
#endif