Skip to content

Commit 6b6b368

Browse files
committed
regcomp.c - use macro wrappers to minimize impact of struct split
We will move various members of the regexp structure to a new structure which just contains information about the match. Wrapping the members in the standard macros means that change can be made less invasive. We already did all of this in regexec.c
1 parent 2f31aef commit 6b6b368

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

regcomp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13275,7 +13275,7 @@ Perl_reg_temp_copy(pTHX_ REGEXP *dsv, REGEXP *ssv)
1327513275

1327613276
RX_MATCH_COPIED_off(dsv);
1327713277
#ifdef PERL_ANY_COW
13278-
drx->saved_copy = NULL;
13278+
RXp_SAVED_COPY(drx) = NULL;
1327913279
#endif
1328013280
drx->mother_re = ReREFCNT_inc(srx->mother_re ? srx->mother_re : ssv);
1328113281
SvREFCNT_inc_void(drx->qr_anoncv);
@@ -13500,11 +13500,11 @@ Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLONE_PARAMS *param)
1350013500
RXi_SET(ret, CALLREGDUPE_PVT(dstr, param));
1350113501

1350213502
if (RX_MATCH_COPIED(dstr))
13503-
ret->subbeg = SAVEPVN(ret->subbeg, ret->sublen);
13503+
RXp_SUBBEG(ret) = SAVEPVN(RXp_SUBBEG(ret), RXp_SUBLEN(ret));
1350413504
else
13505-
ret->subbeg = NULL;
13505+
RXp_SUBBEG(ret) = NULL;
1350613506
#ifdef PERL_ANY_COW
13507-
ret->saved_copy = NULL;
13507+
RXp_SAVED_COPY(ret) = NULL;
1350813508
#endif
1350913509

1351013510
if (r->logical_to_parno) {

0 commit comments

Comments
 (0)