summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-07-19 12:38:30 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-07-19 12:38:30 +0000
commita15299417de39f35d2ce17e6891b4f961265fb6a (patch)
tree676ab2ce1d7c4e738906552a4d6c4f71645f7d16 /pp_hot.c
parent911d147d409bfec728014bf1ae544556d9e97f28 (diff)
parentbdda3fbd757cd1d51073d4e041d25f173c8b2f82 (diff)
downloadperl-a15299417de39f35d2ce17e6891b4f961265fb6a.tar.gz
Merge Mainline
p4raw-id: //depot/ansiperl@1566
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pp_hot.c b/pp_hot.c
index e7b7ae0427..cca05f738d 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -853,8 +853,6 @@ PP(pp_match)
}
}
}
- if (!rx->nparens && !global)
- gimme = G_SCALAR; /* accidental array context? */
safebase = (((gimme == G_ARRAY) || global || !rx->nparens)
&& !PL_sawampersand);
safebase = safebase ? 0 : REXEC_COPY_STR ;
@@ -958,6 +956,8 @@ play_it_again:
PUTBACK; /* EVAL blocks may use stack */
goto play_it_again;
}
+ else if (!iters)
+ XPUSHs(&sv_yes);
LEAVE_SCOPE(oldsave);
RETURN;
}
@@ -1590,7 +1590,9 @@ PP(pp_subst)
DIE("panic: do_subst");
strend = s + len;
- maxiters = (strend - s) + 10;
+ maxiters = 2*(strend - s) + 10; /* We can match twice at each
+ position, once with zero-length,
+ second time with non-zero. */
if (!rx->prelen && PL_curpm) {
pm = PL_curpm;