Skip to content

Commit 0bb5b35

Browse files
committed
RExC_state_t: convert sawback to boolean
1 parent f0ca328 commit 0bb5b35

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

regcomp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
16881688
}
16891689
assert(!pRExC_state->runtime_code_qr);
16901690

1691-
RExC_sawback = 0;
1691+
RExC_sawback = false;
16921692

16931693
RExC_seen = 0;
16941694
RExC_maxlen = 0;
@@ -2910,7 +2910,7 @@ S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state,
29102910
RExC_rxi->data->data[num]=(void*)sv_dat;
29112911
SvREFCNT_inc_simple_void_NN(sv_dat);
29122912
}
2913-
RExC_sawback = 1;
2913+
RExC_sawback = true;
29142914
ret = reg2node(pRExC_state,
29152915
((! FOLD)
29162916
? REFN
@@ -6203,7 +6203,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
62036203
REQUIRE_PARENS_PASS;
62046204
}
62056205
}
6206-
RExC_sawback = 1;
6206+
RExC_sawback = true;
62076207
ret = reg2node(pRExC_state,
62086208
((! FOLD)
62096209
? REF

regcomp_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct RExC_state_t {
5353
regnode *emit_start; /* Start of emitted-code area */
5454
regnode_offset emit; /* Code-emit pointer */
5555
I32 naughty; /* How bad is this pattern? */
56-
I32 sawback; /* Did we see \1, ...? */
56+
bool sawback; /* Did we see \1, ...? */
5757
SSize_t size; /* Number of regnode equivalents in
5858
pattern */
5959
Size_t sets_depth; /* Counts recursion depth of already-

0 commit comments

Comments
 (0)