perl 5.003_04: utils/perldoc.PL
[p5sagit/p5-mst-13.2.git] / cop.h
diff --git a/cop.h b/cop.h
index 88bed59..6aa32df 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -52,6 +52,9 @@ struct block_sub {
        }                                                               \
        if (cx->blk_sub.cv) {                                           \
            if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth)) {    \
+               if (cx->blk_sub.hasargs) {                              \
+                   SvREFCNT_inc((SV*)cx->blk_sub.argarray);            \
+               }                                                       \
                SvREFCNT_dec((SV*)cx->blk_sub.cv);                      \
            }                                                           \
        }
@@ -144,7 +147,7 @@ struct block {
        cx->blk_oldretsp        = retstack_ix,                          \
        cx->blk_oldpm           = curpm,                                \
        cx->blk_gimme           = gimme;                                \
-       DEBUG_l( fprintf(stderr,"Entering block %ld, type %s\n",        \
+       DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Entering block %ld, type %s\n",        \
                    (long)cxstack_ix, block_type[t]); )
 
 /* Exit a block (RETURN and LAST). */
@@ -156,7 +159,7 @@ struct block {
        retstack_ix     = cx->blk_oldretsp,                             \
        pm              = cx->blk_oldpm,                                \
        gimme           = cx->blk_gimme;                                \
-       DEBUG_l( fprintf(stderr,"Leaving block %ld, type %s\n",         \
+       DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Leaving block %ld, type %s\n",         \
                    (long)cxstack_ix+1,block_type[cx->cx_type]); )
 
 /* Continue a block elsewhere (NEXT and REDO). */
@@ -180,6 +183,7 @@ struct subst {
     char *     sbu_m;
     char *     sbu_strend;
     char *     sbu_subbase;
+    REGEXP *   sbu_rx;
 };
 #define sb_iters       cx_u.cx_subst.sbu_iters
 #define sb_maxiters    cx_u.cx_subst.sbu_maxiters
@@ -193,6 +197,7 @@ struct subst {
 #define sb_m           cx_u.cx_subst.sbu_m
 #define sb_strend      cx_u.cx_subst.sbu_strend
 #define sb_subbase     cx_u.cx_subst.sbu_subbase
+#define sb_rx          cx_u.cx_subst.sbu_rx
 
 #define PUSHSUBST(cx) CXINC, cx = &cxstack[cxstack_ix],                        \
        cx->sb_iters            = iters,                                \
@@ -206,6 +211,7 @@ struct subst {
        cx->sb_s                = s,                                    \
        cx->sb_m                = m,                                    \
        cx->sb_strend           = strend,                               \
+       cx->sb_rx               = rx,                                   \
        cx->cx_type             = CXt_SUBST
 
 #define POPSUBST(cx) cxstack_ix--