summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-11-26 22:25:18 +0000
committerNicholas Clark <nick@ccl4.org>2008-11-26 22:25:18 +0000
commit9c105995f0120a86f489fa9da8e150fc55635f02 (patch)
tree1616d443a1213e27344ffb50679b59392fae193a /cop.h
parent1f676739c0ff005ad6d6d4d3691c095800bc458c (diff)
downloadperl-9c105995f0120a86f489fa9da8e150fc55635f02.tar.gz
rxres_free() and rxres_restore() are only used in pp_ctl.c, so can be
static. Macros PUSHSUBST() and POPSUBST() are only viable in PERL_CORE. p4raw-id: //depot/perl@34935
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/cop.h b/cop.h
index dae356d6a0..39a6b01484 100644
--- a/cop.h
+++ b/cop.h
@@ -610,7 +610,8 @@ struct subst {
#define sb_rxres cx_u.cx_subst.sbu_rxres
#define sb_rx cx_u.cx_subst.sbu_rx
-#define PUSHSUBST(cx) CXINC, cx = &cxstack[cxstack_ix], \
+#ifdef PERL_CORE
+# define PUSHSUBST(cx) CXINC, cx = &cxstack[cxstack_ix], \
cx->sb_iters = iters, \
cx->sb_maxiters = maxiters, \
cx->sb_rflags = r_flags, \
@@ -628,11 +629,12 @@ struct subst {
rxres_save(&cx->sb_rxres, rx); \
(void)ReREFCNT_inc(rx)
-#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE)
-
-#define POPSUBST(cx) cx = &cxstack[cxstack_ix--]; \
+# define POPSUBST(cx) cx = &cxstack[cxstack_ix--]; \
rxres_free(&cx->sb_rxres); \
ReREFCNT_dec(cx->sb_rx)
+#endif
+
+#define CxONCE(cx) ((cx)->cx_type & CXp_ONCE)
struct context {
union {