[dummy merge]
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 6eab4da..569fb4f 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1,6 +1,6 @@
 /*    pp_ctl.c
  *
- *    Copyright (c) 1991-1994, Larry Wall
+ *    Copyright (c) 1991-1997, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -1127,8 +1127,8 @@ sortcv(a, b)
 const void *a;
 const void *b;
 {
-    SV **str1 = (SV **) a;
-    SV **str2 = (SV **) b;
+    SV * const *str1 = (SV * const *)a;
+    SV * const *str2 = (SV * const *)b;
     I32 oldsaveix = savestack_ix;
     I32 oldscopeix = scopestack_ix;
     I32 result;
@@ -1154,7 +1154,7 @@ sortcmp(a, b)
 const void *a;
 const void *b;
 {
-    return sv_cmp(*(SV **)a, *(SV **)b);
+    return sv_cmp(*(SV * const *)a, *(SV * const *)b);
 }
 
 static int
@@ -1162,7 +1162,7 @@ sortcmp_locale(a, b)
 const void *a;
 const void *b;
 {
-    return sv_cmp_locale(*(SV **)a, *(SV **)b);
+    return sv_cmp_locale(*(SV * const *)a, *(SV * const *)b);
 }
 
 PP(pp_reset)
@@ -1946,10 +1946,10 @@ OP *o;
 {
     int ret;
     int oldrunlevel = runlevel;
+    OP *oldop = op;
     Sigjmp_buf oldtop;
 
     op = o;
-    runlevel--;                                /* pretense */
     Copy(top_env, oldtop, 1, Sigjmp_buf);
 #ifdef DEBUGGING
     assert(mustcatch == TRUE);
@@ -1960,6 +1960,7 @@ OP *o;
        Copy(oldtop, top_env, 1, Sigjmp_buf);
        runlevel = oldrunlevel;
        mustcatch = TRUE;
+       op = oldop;
        Siglongjmp(top_env, ret);
        /* NOTREACHED */
     case 3:
@@ -1967,6 +1968,7 @@ OP *o;
            PerlIO_printf(PerlIO_stderr(), "panic: restartop\n");
            break;
        }
+       mustcatch = FALSE;
        op = restartop;
        restartop = 0;
        /* FALL THROUGH */
@@ -1977,6 +1979,7 @@ OP *o;
     Copy(oldtop, top_env, 1, Sigjmp_buf);
     runlevel = oldrunlevel;
     mustcatch = TRUE;
+    op = oldop;
     return Nullop;
 }