In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c5e13bf5ce9484aa5cbdcc8102718ee15d41c091?hp=3f2ee99ade0c181233cf46892c1f80db54b71451>
- Log ----------------------------------------------------------------- commit c5e13bf5ce9484aa5cbdcc8102718ee15d41c091 Author: Nicholas Clark <n...@ccl4.org> Date: Tue Feb 19 14:35:49 2013 +0100 Eliminate 'swap' from struct regexp_internal. It's been unused since commit e9105d30edfbaa7f in July 2009. ----------------------------------------------------------------------- Summary of changes: pod/perlreguts.pod | 10 ---------- regcomp.c | 4 ---- regexp.h | 1 - 3 files changed, 0 insertions(+), 15 deletions(-) diff --git a/pod/perlreguts.pod b/pod/perlreguts.pod index 75dc6dd..fbcb149 100644 --- a/pod/perlreguts.pod +++ b/pod/perlreguts.pod @@ -796,7 +796,6 @@ regex engine. Since it is specific to perl it is only of curiosity value to other engine implementations. typedef struct regexp_internal { - regexp_paren_ofs *swap; /* Swap copy of *startp / *endp */ U32 *offsets; /* offset annotations 20001228 MJD * data about mapping the program to * the string*/ @@ -814,15 +813,6 @@ value to other engine implementations. =over 5 -=item C<swap> - -C<swap> formerly was an extra set of startp/endp stored in a -C<regexp_paren_ofs> struct. This was used when the last successful match -was from the same pattern as the current pattern, so that a partial -match didn't overwrite the previous match's results, but it caused a -problem with re-entrant code such as trying to build the UTF-8 swashes. -Currently unused and left for backward compatibility with 5.10.0. - =item C<offsets> Offsets holds a mapping of offset in the C<program> diff --git a/regcomp.c b/regcomp.c index ad0eabf..9edd1a8 100644 --- a/regcomp.c +++ b/regcomp.c @@ -14986,10 +14986,6 @@ Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLONE_PARAMS *param) npar = r->nparens+1; Newx(ret->offs, npar, regexp_paren_pair); Copy(r->offs, ret->offs, npar, regexp_paren_pair); - if(ret->swap) { - /* no need to copy these */ - Newx(ret->swap, npar, regexp_paren_pair); - } if (ret->substrs) { /* Do it this way to avoid reading from *r after the StructCopy(). diff --git a/regexp.h b/regexp.h index 9cdc009..6f79be7 100644 --- a/regexp.h +++ b/regexp.h @@ -119,7 +119,6 @@ struct reg_code_block { /* during matching */ \ U32 lastparen; /* last open paren matched */ \ U32 lastcloseparen; /* last close paren matched */ \ - regexp_paren_pair *swap; /* Unused: 5.10.1 and later */ \ /* Array of offsets for (@-) and (@+) */ \ regexp_paren_pair *offs; \ /* saved or original string so \digit works forever. */ \ -- Perl5 Master Repository