This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OS/2: survive SIGCHLD
[perl5.git] / scope.h
diff --git a/scope.h b/scope.h
index 1506e5e..377a8b4 100644 (file)
--- a/scope.h
+++ b/scope.h
 #define SAVEt_COP_ARYBASE      41
 #define SAVEt_RE_STATE         42
 #define SAVEt_COMPILE_WARNINGS 43
+#define SAVEt_STACK_CXPOS      44
 
 #ifndef SCOPE_SAVES_SIGNAL_MASK
 #define SCOPE_SAVES_SIGNAL_MASK 0
 #endif
 
-#define SSCHECK(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow()
-#define SSGROW(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow_cnt(need)
+#define SSCHECK(need) if (PL_savestack_ix + (I32)(need) > PL_savestack_max) savestack_grow()
+#define SSGROW(need) if (PL_savestack_ix + (I32)(need) > PL_savestack_max) savestack_grow_cnt(need)
 #define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i))
 #define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i))
 #define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p))
@@ -158,12 +159,12 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
            SSPUSHPTR(GvHV(PL_hintgv));                 \
            GvHV(PL_hintgv) = Perl_hv_copy_hints_hv(aTHX_ GvHV(PL_hintgv)); \
        }                                               \
-       if (PL_compiling.cop_hints) {                   \
+       if (PL_compiling.cop_hints_hash) {              \
            HINTS_REFCNT_LOCK;                          \
-           PL_compiling.cop_hints->refcounted_he_refcnt++;     \
+           PL_compiling.cop_hints_hash->refcounted_he_refcnt++;        \
            HINTS_REFCNT_UNLOCK;                        \
        }                                               \
-       SSPUSHPTR(PL_compiling.cop_hints);              \
+       SSPUSHPTR(PL_compiling.cop_hints_hash);         \
        SSPUSHINT(PL_hints);                            \
        SSPUSHINT(SAVEt_HINTS);                         \
     } STMT_END
@@ -205,6 +206,14 @@ Closing bracket on a callback.  See C<ENTER> and L<perlcall>.
        SSPUSHINT(SAVEt_COMPILE_WARNINGS);              \
     } STMT_END
 
+#define SAVESTACK_CXPOS() \
+    STMT_START {                                  \
+        SSCHECK(3);                               \
+        SSPUSHINT(cxstack[cxstack_ix].blk_oldsp); \
+        SSPUSHINT(cxstack_ix);                    \
+        SSPUSHINT(SAVEt_STACK_CXPOS);             \
+    } STMT_END
+
 #ifdef USE_ITHREADS
 #  define SAVECOPSTASH(c)      SAVEPPTR(CopSTASHPV(c))
 #  define SAVECOPSTASH_FREE(c) SAVESHAREDPV(CopSTASHPV(c))