This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
the workaround is needed in all 7.2.* compilers,
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index 91e0374..3680a88 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -1,6 +1,6 @@
 /*    scope.c
  *
- *    Copyright (c) 1991-1999, Larry Wall
+ *    Copyright (c) 1991-2000, 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.
@@ -16,6 +16,7 @@
 #define PERL_IN_SCOPE_C
 #include "perl.h"
 
+#if defined(PERL_FLEXIBLE_EXCEPTIONS)
 void *
 Perl_default_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
                     protect_body_t body, ...)
@@ -36,8 +37,6 @@ Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
     int ex;
     void *ret;
 
-    DEBUG_l(Perl_deb(aTHX_ "Setting up local jumplevel %p, was %p\n",
-               pcur_env, PL_top_env));
     JMPENV_PUSH(ex);
     if (ex)
        ret = NULL;
@@ -47,6 +46,7 @@ Perl_vdefault_protect(pTHX_ volatile JMPENV *pcur_env, int *excpt,
     JMPENV_POP;
     return ret;
 }
+#endif
 
 SV**
 Perl_stack_grow(pTHX_ SV **sp, SV **p, int n)
@@ -316,7 +316,7 @@ Perl_save_ary(pTHX_ GV *gv)
     av = GvAVn(gv);
     if (SvMAGIC(oav)) {
        SvMAGIC(av) = SvMAGIC(oav);
-       SvFLAGS(av) |= SvMAGICAL(oav);
+       SvFLAGS((SV*)av) |= SvMAGICAL(oav);
        SvMAGICAL_off(oav);
        SvMAGIC(oav) = 0;
        PL_localizing = 1;
@@ -341,7 +341,7 @@ Perl_save_hash(pTHX_ GV *gv)
     hv = GvHVn(gv);
     if (SvMAGIC(ohv)) {
        SvMAGIC(hv) = SvMAGIC(ohv);
-       SvFLAGS(hv) |= SvMAGICAL(ohv);
+       SvFLAGS((SV*)hv) |= SvMAGICAL(ohv);
        SvMAGICAL_off(ohv);
        SvMAGIC(ohv) = 0;
        PL_localizing = 1;
@@ -715,7 +715,7 @@ Perl_leave_scope(pTHX_ I32 base)
            if (GvAV(gv)) {
                AV *goner = GvAV(gv);
                SvMAGIC(av) = SvMAGIC(goner);
-               SvFLAGS(av) |= SvMAGICAL(goner);
+               SvFLAGS((SV*)av) |= SvMAGICAL(goner);
                SvMAGICAL_off(goner);
                SvMAGIC(goner) = 0;
                SvREFCNT_dec(goner);
@@ -994,8 +994,9 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
        PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_OP_TYPE = %s (%s)\n",
                PL_op_name[cx->blk_eval.old_op_type],
                PL_op_desc[cx->blk_eval.old_op_type]);
-       PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
-               cx->blk_eval.old_name);
+       if (cx->blk_eval.old_namesv)
+           PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_NAME = %s\n",
+                         SvPVX(cx->blk_eval.old_namesv));
        PerlIO_printf(Perl_debug_log, "BLK_EVAL.OLD_EVAL_ROOT = 0x%"UVxf"\n",
                PTR2UV(cx->blk_eval.old_eval_root));
        break;