Mingw32 PERL_OBJECT tweaks
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index e7b7ae0..823da44 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -284,7 +284,7 @@ PP(pp_pushre)
     Copy(&PL_op, &LvTARGOFF(sv), 1, OP*);
     XPUSHs(sv);
 #else
-    XPUSHs((SV*)op);
+    XPUSHs((SV*)PL_op);
 #endif
     RETURN;
 }
@@ -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(&PL_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;