It would be nice to upgrade the right file. Double grrrrr.
[p5sagit/p5-mst-13.2.git] / pp_sort.c
index 59f975e..9592edb 100644 (file)
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -375,7 +375,7 @@ S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags)
     }
 
     if (nmemb <= SMALLSORT) aux = small;       /* use stack for aux array */
-    else { New(799,aux,nmemb,gptr); }          /* allocate auxilliary array */
+    else { Newx(aux,nmemb,gptr); }             /* allocate auxilliary array */
     level = 0;
     stackp = stack;
     stackp->runs = dynprep(aTHX_ base, aux, nmemb, cmp);
@@ -1358,7 +1358,7 @@ S_qsortsv(pTHX_ gptr *list1, size_t nmemb, SVCOMPARE_t cmp, U32 flags)
 
         /* Small arrays can use the stack, big ones must be allocated */
         if (nmemb <= SMALLSORT) indir = small;
-        else { New(1799, indir, nmemb, gptr *); }
+        else { Newx(indir, nmemb, gptr *); }
 
         /* Copy pointers to original array elements into indirect array */
         for (n = nmemb, pp = indir, q = list1; n--; ) *pp++ = q++;
@@ -1544,7 +1544,8 @@ PP(pp_sort)
                SAVEVPTR(CvROOT(cv)->op_ppaddr);
                CvROOT(cv)->op_ppaddr = PL_ppaddr[OP_NULL];
 
-               PAD_SET_CUR(CvPADLIST(cv), 1);
+               SAVECOMPPAD();
+               PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);
             }
        }
     }