X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Hooks.git;a=blobdiff_plain;f=src%2F5018000%2Finline_invlist.c;fp=src%2F5018000%2Finline_invlist.c;h=332a3d8e9713aa72ede67065dd3ffe280991a90e;hp=b56ce60002f7697739ba3fb3a1ddc0f925bf9fa4;hb=3844497d56f979a0275bf10b2a322c9e9baab2bf;hpb=7a8e4ba50dd698a702ecce6a8c9c4d793fa690ac diff --git a/src/5018000/inline_invlist.c b/src/5018000/inline_invlist.c index b56ce60..332a3d8 100644 --- a/src/5018000/inline_invlist.c +++ b/src/5018000/inline_invlist.c @@ -8,10 +8,10 @@ #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 @@ -25,7 +25,7 @@ /* 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. @@ -43,35 +43,35 @@ 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 contain code point as part of the set? */ + /* Does contain code point 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