Skip to content

Commit

Permalink
mixed decls
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Oct 7, 2020
1 parent 503c2d5 commit 2ec466e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions regcomp.c
Expand Up @@ -1571,8 +1571,7 @@ S_ssc_is_anything(const regnode_ssc *ssc)

/* If e.g., both \w and \W are set, matches everything */
if (ANYOF_POSIXL_SSC_TEST_ANY_SET(ssc)) {
int i;
for (i = 0; i < ANYOF_POSIXL_MAX; i += 2) {
for (int i = 0; i < ANYOF_POSIXL_MAX; i += 2) {
if (ANYOF_POSIXL_TEST(ssc, i) && ANYOF_POSIXL_TEST(ssc, i+1)) {
return TRUE;
}
Expand Down Expand Up @@ -1659,7 +1658,6 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state,

SV* invlist = NULL;
SV* only_utf8_locale_invlist = NULL;
unsigned int i;
const U32 n = ARG(node);
bool new_node_has_latin1 = FALSE;
const U8 flags = (inRANGE(OP(node), ANYOFH, ANYOFRb))
Expand Down Expand Up @@ -1718,7 +1716,7 @@ S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state,

/* Add in the points from the bit map */
if (! inRANGE(OP(node), ANYOFH, ANYOFRb)) {
for (i = 0; i < NUM_ANYOF_CODE_POINTS; i++) {
for (unsigned int i = 0; i < NUM_ANYOF_CODE_POINTS; i++) {
if (ANYOF_BITMAP_TEST(node, i)) {
unsigned int start = i++;

Expand Down Expand Up @@ -1988,7 +1986,6 @@ S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc,
* another SSC or a regular ANYOF class. Can create false positives if
* 'or_with' is to be inverted. */

SV* ored_cp_list;
U8 ored_flags;
U8 or_with_flags = inRANGE(OP(or_with), ANYOFH, ANYOFRb)
? 0
Expand All @@ -2000,6 +1997,7 @@ S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc,

/* 'or_with' is used as-is if it too is an SSC; otherwise have to extract
* the code point inversion list and just the relevant flags */
SV* ored_cp_list;
if (is_ANYOF_SYNTHETIC(or_with)) {
ored_cp_list = ((regnode_ssc*) or_with)->invlist;
ored_flags = or_with_flags;
Expand Down

0 comments on commit 2ec466e

Please sign in to comment.