move new variables to the end of the interpreter structure (for
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 801f3f1..a924d2e 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -891,6 +891,10 @@ PP(pp_sort)
                    PL_secondgv = gv_fetchpv("b", TRUE, SVt_PV);
                    PL_sortstash = stash;
                }
+#ifdef USE_THREADS
+               sv_lock((SV *)PL_firstgv);
+               sv_lock((SV *)PL_secondgv);
+#endif
                SAVESPTR(GvSV(PL_firstgv));
                SAVESPTR(GvSV(PL_secondgv));
            }
@@ -913,6 +917,7 @@ PP(pp_sort)
                cx->blk_sub.savearray = GvAV(PL_defgv);
                GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av);
 #endif /* USE_THREADS */
+               cx->blk_sub.oldcurpad = PL_curpad;
                cx->blk_sub.argarray = av;
            }
            qsortsv((myorigmark+1), max,
@@ -1555,7 +1560,7 @@ PP(pp_caller)
            PL_dbargs = GvAV(gv_AVadd(tmpgv = gv_fetchpv("DB::args", TRUE,
                                SVt_PVAV)));
            GvMULTI_on(tmpgv);
-           AvREAL_off(PL_dbargs);              /* XXX Should be REIFY */
+           AvREAL_off(PL_dbargs);      /* XXX should be REIFY (see av.h) */
        }
 
        if (AvMAX(PL_dbargs) < AvFILLp(ary) + off)
@@ -2308,6 +2313,7 @@ PP(pp_goto)
                    cx->blk_sub.savearray = GvAV(PL_defgv);
                    GvAV(PL_defgv) = (AV*)SvREFCNT_inc(av);
 #endif /* USE_THREADS */
+                   cx->blk_sub.oldcurpad = PL_curpad;
                    cx->blk_sub.argarray = av;
                    ++mark;