[inseperable differences to perl 5.004_03]
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index 33a5048..98d99a4 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -1,6 +1,6 @@
 /*    scope.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.
@@ -525,7 +525,8 @@ I32 base;
            break;
        case SAVEt_FREEOP:
            ptr = SSPOPPTR;
-           curpad = AvARRAY(comppad);
+           if (comppad)
+               curpad = AvARRAY(comppad);
            op_free((OP*)ptr);
            break;
        case SAVEt_FREEPV:
@@ -535,7 +536,8 @@ I32 base;
        case SAVEt_CLEARSV:
            ptr = (void*)&curpad[SSPOPLONG];
            sv = *(SV**)ptr;
-           if (SvREFCNT(sv) <= 1) { /* Can clear pad variable in place. */
+           /* Can clear pad variable in place? */
+           if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
                if (SvTHINKFIRST(sv)) {
                    if (SvREADONLY(sv))
                        croak("panic: leave_scope clearsv");
@@ -696,8 +698,8 @@ CONTEXT* cx;
                (long)cx->sb_m);
        PerlIO_printf(Perl_debug_log, "SB_STREND = 0x%lx\n",
                (long)cx->sb_strend);
-       PerlIO_printf(Perl_debug_log, "SB_SUBBASE = 0x%lx\n",
-               (long)cx->sb_subbase);
+       PerlIO_printf(Perl_debug_log, "SB_RXRES = 0x%lx\n",
+               (long)cx->sb_rxres);
        break;
     }
 }