This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cop.h: Extend core-only portion
authorKarl Williamson <khw@cpan.org>
Sat, 17 Oct 2020 12:43:55 +0000 (06:43 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 29 Nov 2020 16:01:40 +0000 (09:01 -0700)
This encloses some #defines in a PERL_CORE section, as their only use is
in the macro immediately following, already confined to core.

cop.h

diff --git a/cop.h b/cop.h
index 17df8b5..0ddcd48 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -818,6 +818,9 @@ struct subst {
     void *     sbu_rxres;
     REGEXP *   sbu_rx;
 };
+
+#ifdef PERL_CORE
+
 #define sb_iters       cx_u.cx_subst.sbu_iters
 #define sb_maxiters    cx_u.cx_subst.sbu_maxiters
 #define sb_rflags      cx_u.cx_subst.sbu_rflags
@@ -831,7 +834,6 @@ struct subst {
 #define sb_rxres       cx_u.cx_subst.sbu_rxres
 #define sb_rx          cx_u.cx_subst.sbu_rx
 
-#ifdef PERL_CORE
 #  define CX_PUSHSUBST(cx) CXINC, cx = CX_CUR(),                       \
        cx->blk_oldsaveix = oldsave,                                    \
        cx->sb_iters            = iters,                                \