Fix regexec.c so $^N and $+ are correctly updated so that they work properly inside...
[p5sagit/p5-mst-13.2.git] / pp.c
diff --git a/pp.c b/pp.c
index 7e5cef3..6026f24 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4251,8 +4251,8 @@ PP(pp_anonlist)
     const I32 items = SP - MARK;
     SV * const av = (SV *) av_make(items, MARK+1);
     SP = ORIGMARK;             /* av_make() might realloc stack_sp */
-    XPUSHs(sv_2mortal((PL_op->op_flags & OPf_SPECIAL)
-                     ? newRV_noinc(av) : av));
+    mXPUSHs((PL_op->op_flags & OPf_SPECIAL)
+           ? newRV_noinc(av) : av);
     RETURN;
 }
 
@@ -4271,8 +4271,8 @@ PP(pp_anonhash)
        (void)hv_store_ent(hv,key,val,0);
     }
     SP = ORIGMARK;
-    XPUSHs(sv_2mortal((PL_op->op_flags & OPf_SPECIAL)
-                     ? newRV_noinc((SV*) hv) : (SV*)hv));
+    mXPUSHs((PL_op->op_flags & OPf_SPECIAL)
+           ? newRV_noinc((SV*) hv) : (SV*) hv);
     RETURN;
 }
 
@@ -4837,7 +4837,7 @@ PP(pp_split)
             }
         }
     }
-    else if (do_utf8 == ((RX_EXTFLAGS(rx) & RXf_UTF8) != 0) &&
+    else if (do_utf8 == (RX_UTF8(rx) != 0) &&
             (RX_EXTFLAGS(rx) & RXf_USE_INTUIT) && !RX_NPARENS(rx)
             && (RX_EXTFLAGS(rx) & RXf_CHECK_ALL)
             && !(RX_EXTFLAGS(rx) & RXf_ANCH)) {
@@ -4845,7 +4845,7 @@ PP(pp_split)
        SV * const csv = CALLREG_INTUIT_STRING(rx);
 
        len = RX_MINLENRET(rx);
-       if (len == 1 && !(RX_EXTFLAGS(rx) & RXf_UTF8) && !tail) {
+       if (len == 1 && !RX_UTF8(rx) && !tail) {
            const char c = *SvPV_nolen_const(csv);
            while (--limit) {
                for (m = s; m < strend && *m != c; m++)