This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate change #11519 from perlio:
[perl5.git] / pp_ctl.c
index 68db6bb..1605e21 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -86,36 +86,15 @@ PP(pp_regcomp)
     SV *tmpstr;
     STRLEN len;
     MAGIC *mg = Null(MAGIC*);
+    
+    tmpstr = POPs;
 
-Change 10771 by jhi@alpha on 2001/06/21 12:10:29
-
-        Subject: [PATCH] Make /o work under i?threads
-        From: Richard Soderberg <rs@crystalflame.net>
-        Date: Thu, 21 Jun 2001 05:21:43 -0700 (PDT)
-        Message-ID: <Pine.LNX.4.21.0106210518210.2479-100000@oregonnet.com>
-
-Affected files ...
-
-  ... //depot/perl/pp_ctl.c#267 edit
-
-Differences ...
-
-  ==== //depot/perl/pp_ctl.c#267 (text) ====
-Index: perl/pp_ctl.c
---- perl/pp_ctl.c.~1~   Sun Jun 24 22:31:38 2001
-+++ perl/pp_ctl.c       Sun Jun 24 22:31:38 2001
-@@ -88,6 +88,13 @@
-     MAGIC *mg = Null(MAGIC*);
-     tmpstr = POPs;
-
-     /* prevent recompiling under /o and ithreads. */
+    /* prevent recompiling under /o and ithreads. */
 #if defined(USE_ITHREADS) || defined(USE_THREADS)
-     if (pm->op_pmflags & PMf_KEEP && PM_GETRE(pm))
-         RETURN;
+    if (pm->op_pmflags & PMf_KEEP && PM_GETRE(pm))
+        RETURN;
 #endif
 
-    tmpstr = POPs;
     if (SvROK(tmpstr)) {
        SV *sv = SvRV(tmpstr);
        if(SvMAGICAL(sv))
@@ -170,6 +149,8 @@ Index: perl/pp_ctl.c
        pm = PL_curpm;
     else if (strEQ("\\s+", PM_GETRE(pm)->precomp))
        pm->op_pmflags |= PMf_WHITE;
+    else
+       pm->op_pmflags &= ~PMf_WHITE;
 
     /* XXX runtime compiled output needs to move to the pad */
     if (pm->op_pmflags & PMf_KEEP) {
@@ -1570,7 +1551,7 @@ PP(pp_caller)
 
     if (MAXARG)
        count = POPi;
-    EXTEND(SP, 10);
+
     for (;;) {
        /* we may be in a higher stacklevel, so dig down deeper */
        while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
@@ -1579,8 +1560,10 @@ PP(pp_caller)
            cxix = dopoptosub_at(ccstack, top_si->si_cxix);
        }
        if (cxix < 0) {
-           if (GIMME != G_ARRAY)
+           if (GIMME != G_ARRAY) {
+               EXTEND(SP, 1);
                RETPUSHUNDEF;
+            }
            RETURN;
        }
        if (PL_DBsub && cxix >= 0 &&
@@ -1602,6 +1585,7 @@ PP(pp_caller)
 
     stashname = CopSTASHPV(cx->blk_oldcop);
     if (GIMME != G_ARRAY) {
+        EXTEND(SP, 1);
        if (!stashname)
            PUSHs(&PL_sv_undef);
        else {
@@ -1612,6 +1596,8 @@ PP(pp_caller)
        RETURN;
     }
 
+    EXTEND(SP, 10);
+
     if (!stashname)
        PUSHs(&PL_sv_undef);
     else