Skip to content

Commit

Permalink
rename RX_HAS_CUTGROUP() to RXp_HAS_CUTGROUP()
Browse files Browse the repository at this point in the history
It takes a private/internal regexp* pointer rather than a public REGEXP
pointer, so rename it to match the other RXp_ macros.

Most RXp_ macros are a variant of an RX_ macro; however, I didn't add an
RX_HAS_CUTGROUP() macro - someone can always add that if needed. (There's
only one use of RXp_HAS_CUTGROUP in core).
  • Loading branch information
iabyn committed Jul 27, 2017
1 parent a885a8e commit ea0673e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regexec.c
Expand Up @@ -5375,7 +5375,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
SV *sv_yes_mark = NULL; /* last mark name we have seen
during a successful match */
U32 lastopen = 0; /* last open we saw */
bool has_cutgroup = RX_HAS_CUTGROUP(rex) ? 1 : 0;
bool has_cutgroup = RXp_HAS_CUTGROUP(rex) ? 1 : 0;
SV* const oreplsv = GvSVn(PL_replgv);
/* these three flags are set by various ops to signal information to
* the very next op. They have a useful lifetime of exactly one loop
Expand Down
2 changes: 1 addition & 1 deletion regexp.h
Expand Up @@ -474,7 +474,7 @@ and check for NULL.
# define RX_MATCH_TAINTED_off(rx_sv) (RX_EXTFLAGS(rx_sv) &= ~RXf_TAINTED_SEEN)
#endif

#define RX_HAS_CUTGROUP(prog) ((prog)->intflags & PREGf_CUTGROUP_SEEN)
#define RXp_HAS_CUTGROUP(prog) ((prog)->intflags & PREGf_CUTGROUP_SEEN)

#define RX_MATCH_TAINTED_set(rx_sv, t) ((t) \
? RX_MATCH_TAINTED_on(rx_sv) \
Expand Down

0 comments on commit ea0673e

Please sign in to comment.