summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:08:03 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:08:03 +0000
commitdd5def096b7b2dabfe2022669c29c16240d7da96 (patch)
treee1f1820ca585733b77168de8466f8cfb58d21692
parentb54fc2b60bc365faffaf24860c5306add8af3c87 (diff)
downloadperl-dd5def096b7b2dabfe2022669c29c16240d7da96.tar.gz
Revert change #30081 at dmq's request, and mark its tests
as TODO. (This should restore compilation with g++) p4raw-link: @30081 on //depot/perl: ded05c2a789e70bb7204e21b2aa98c6d1ac776c2 p4raw-id: //depot/perl@30351
-rw-r--r--ext/re/lib/re/Tie/Hash/NamedCapture.pm1
-rw-r--r--ext/re/re.pm1
-rw-r--r--regcomp.c5
-rw-r--r--regexec.c25
-rwxr-xr-xt/op/pat.t4
5 files changed, 5 insertions, 31 deletions
diff --git a/ext/re/lib/re/Tie/Hash/NamedCapture.pm b/ext/re/lib/re/Tie/Hash/NamedCapture.pm
index b86463dfe8..a76c6ab7aa 100644
--- a/ext/re/lib/re/Tie/Hash/NamedCapture.pm
+++ b/ext/re/lib/re/Tie/Hash/NamedCapture.pm
@@ -2,7 +2,6 @@ package re::Tie::Hash::NamedCapture;
use strict;
use warnings;
our $VERSION = "0.01";
-no re 'debug';
use re qw(is_regexp
regname
regnames
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 4f8d4105a8..4a64af3964 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -138,7 +138,6 @@ sub bits {
} elsif ($s eq 'debug' or $s eq 'debugcolor') {
setcolor() if $s =~/color/i;
_load_unload($on);
- last;
} elsif (exists $bitmask{$s}) {
$bits |= $bitmask{$s};
} elsif ($EXPORT_OK{$s}) {
diff --git a/regcomp.c b/regcomp.c
index 197ab12dc0..6ea593ea8d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4710,9 +4710,8 @@ Perl_reg_named_buff_get(pTHX_ const REGEXP * const rx, SV* namesv, U32 flags)
SV* sv_dat=HeVAL(he_str);
I32 *nums=(I32*)SvPVX(sv_dat);
for ( i=0; i<SvIVX(sv_dat); i++ ) {
- if ((I32)(rx->nparens) >= nums[i]
- && rx->startp[nums[i]] != -1
- && rx->endp[nums[i]] != -1)
+ if ((I32)(rx->lastparen) >= nums[i] &&
+ rx->endp[nums[i]] != -1)
{
ret = CALLREG_NUMBUF(rx,nums[i],NULL);
if (!retarray)
diff --git a/regexec.c b/regexec.c
index daa8e00523..e8e0e2aea8 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2142,8 +2142,6 @@ phooey:
}
-
-
/*
- regtry - try match at specific point
*/
@@ -3596,9 +3594,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
} else {
nochange_depth = 0;
}
- { regexp *ocurpm = PM_GETRE(PL_curpm);
- char *osubbeg = rex->subbeg;
- STRLEN osublen = rex->sublen;
{
/* execute the code in the {...} */
dSP;
@@ -3606,7 +3601,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
OP_4tree * const oop = PL_op;
COP * const ocurcop = PL_curcop;
PAD *old_comppad;
-
n = ARG(scan);
PL_op = (OP_4tree*)rexi->data->data[n];
@@ -3619,10 +3613,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
SV *sv_mrk = get_sv("REGMARK", 1);
sv_setsv(sv_mrk, sv_yes_mark);
}
- /* make sure that $1 and friends are available with nested eval */
- PM_SETRE(PL_curpm,rex);
- rex->subbeg = ocurpm->subbeg;
- rex->sublen = ocurpm->sublen;
CALLRUNOPS(aTHX); /* Scalar context. */
SPAGAIN;
@@ -3636,7 +3626,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
PL_op = oop;
PAD_RESTORE_LOCAL(old_comppad);
PL_curcop = ocurcop;
-
if (!logical) {
/* /(?{...})/ */
sv_setsv(save_scalar(PL_replgv), ret);
@@ -3682,12 +3671,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
}
}
rei = RXi_GET(re);
-
- /* restore PL_curpm after the eval */
- PM_SETRE(PL_curpm,ocurpm);
- rex->sublen = osublen;
- rex->subbeg = osubbeg;
-
DEBUG_EXECUTE_r(
debug_start_match(re, do_utf8, locinput, PL_regeol,
"Matching embedded");
@@ -3701,8 +3684,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
Renew(PL_reg_start_tmp, PL_reg_start_tmpl, char*);
else
Newx(PL_reg_start_tmp, PL_reg_start_tmpl, char*);
- }
-
+ }
eval_recurse_doit: /* Share code with GOSUB below this line */
/* run the pattern returned from (??{...}) */
@@ -3739,11 +3721,6 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
PUSH_YES_STATE_GOTO(EVAL_AB, startpoint);
/* NOTREACHED */
}
- /* restore PL_curpm after the eval */
- PM_SETRE(PL_curpm,ocurpm);
- rex->sublen = osublen;
- rex->subbeg = osubbeg;
- }
/* logical is 1, /(?(?{...})X|Y)/ */
sw = (bool)SvTRUE(ret);
logical = 0;
diff --git a/t/op/pat.t b/t/op/pat.t
index 46900e82e8..fe2eef63a4 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -4267,11 +4267,11 @@ sub kt
$re = qr/^ ( (??{ $grabit }) ) $ /x;
my @res = '0902862349' =~ $re;
iseq(join("-",@res),"0902862349",
- 'PL_curpm is set properly on nested eval');
+ 'PL_curpm is set properly on nested eval # TODO');
our $qr = qr/ (o) (??{ $1 }) /x;
ok( 'boob'=~/( b (??{ $qr }) b )/x && 1,
- "PL_curpm, nested eval");
+ "PL_curpm, nested eval # TODO");
}
{