diff options
author | Yves Orton <demerphq@gmail.com> | 2023-01-26 16:41:17 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-13 21:26:08 +0800 |
commit | 6b6b3689b8d05608bf090afff941e9cd41a603a8 (patch) | |
tree | 12e19eaebcfc81393bbda13b8f71a6ec80417cee /regcomp.c | |
parent | 2f31aef63c4a2c6863d88988c8f9550db5483813 (diff) | |
download | perl-6b6b3689b8d05608bf090afff941e9cd41a603a8.tar.gz |
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
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13275,7 +13275,7 @@ Perl_reg_temp_copy(pTHX_ REGEXP *dsv, REGEXP *ssv) RX_MATCH_COPIED_off(dsv); #ifdef PERL_ANY_COW - drx->saved_copy = NULL; + RXp_SAVED_COPY(drx) = NULL; #endif drx->mother_re = ReREFCNT_inc(srx->mother_re ? srx->mother_re : ssv); SvREFCNT_inc_void(drx->qr_anoncv); @@ -13500,11 +13500,11 @@ Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLONE_PARAMS *param) RXi_SET(ret, CALLREGDUPE_PVT(dstr, param)); if (RX_MATCH_COPIED(dstr)) - ret->subbeg = SAVEPVN(ret->subbeg, ret->sublen); + RXp_SUBBEG(ret) = SAVEPVN(RXp_SUBBEG(ret), RXp_SUBLEN(ret)); else - ret->subbeg = NULL; + RXp_SUBBEG(ret) = NULL; #ifdef PERL_ANY_COW - ret->saved_copy = NULL; + RXp_SAVED_COPY(ret) = NULL; #endif if (r->logical_to_parno) { |