diff options
-rw-r--r-- | cop.h | 10 | ||||
-rw-r--r-- | embed.fnc | 7 | ||||
-rw-r--r-- | embed.h | 16 | ||||
-rw-r--r-- | pp_ctl.c | 8 | ||||
-rw-r--r-- | proto.h | 6 |
5 files changed, 31 insertions, 16 deletions
@@ -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 { @@ -772,8 +772,11 @@ Ap |Sighandler_t|rsignal |int i|Sighandler_t t p |int |rsignal_restore|int i|NULLOK Sigsave_t* t p |int |rsignal_save |int i|Sighandler_t t1|NN Sigsave_t* save Ap |Sighandler_t|rsignal_state|int i -p |void |rxres_free |NN void** rsp -p |void |rxres_restore |NN void **rsp|NN REGEXP *rx +#if defined(PERL_IN_PP_CTL_C) +s |void |rxres_free |NN void** rsp +s |void |rxres_restore |NN void **rsp|NN REGEXP *rx +#endif +: Used in pp_hot.c p |void |rxres_save |NN void **rsp|NN REGEXP *rx #if !defined(HAS_RENAME) p |I32 |same_dirent |NN const char* a|NN const char* b @@ -758,9 +758,13 @@ #define rsignal_save Perl_rsignal_save #endif #define rsignal_state Perl_rsignal_state +#if defined(PERL_IN_PP_CTL_C) +#ifdef PERL_CORE +#define rxres_free S_rxres_free +#define rxres_restore S_rxres_restore +#endif +#endif #ifdef PERL_CORE -#define rxres_free Perl_rxres_free -#define rxres_restore Perl_rxres_restore #define rxres_save Perl_rxres_save #endif #if !defined(HAS_RENAME) @@ -3102,9 +3106,13 @@ #define rsignal_save(a,b,c) Perl_rsignal_save(aTHX_ a,b,c) #endif #define rsignal_state(a) Perl_rsignal_state(aTHX_ a) +#if defined(PERL_IN_PP_CTL_C) +#ifdef PERL_CORE +#define rxres_free(a) S_rxres_free(aTHX_ a) +#define rxres_restore(a,b) S_rxres_restore(aTHX_ a,b) +#endif +#endif #ifdef PERL_CORE -#define rxres_free(a) Perl_rxres_free(aTHX_ a) -#define rxres_restore(a,b) Perl_rxres_restore(aTHX_ a,b) #define rxres_save(a,b) Perl_rxres_save(aTHX_ a,b) #endif #if !defined(HAS_RENAME) @@ -357,8 +357,8 @@ Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx) } } -void -Perl_rxres_restore(pTHX_ void **rsp, REGEXP *rx) +static void +S_rxres_restore(pTHX_ void **rsp, REGEXP *rx) { UV *p = (UV*)*rsp; U32 i; @@ -387,8 +387,8 @@ Perl_rxres_restore(pTHX_ void **rsp, REGEXP *rx) } } -void -Perl_rxres_free(pTHX_ void **rsp) +static void +S_rxres_free(pTHX_ void **rsp) { UV * const p = (UV*)*rsp; @@ -2705,17 +2705,19 @@ PERL_CALLCONV int Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* sav assert(save) PERL_CALLCONV Sighandler_t Perl_rsignal_state(pTHX_ int i); -PERL_CALLCONV void Perl_rxres_free(pTHX_ void** rsp) +#if defined(PERL_IN_PP_CTL_C) +STATIC void S_rxres_free(pTHX_ void** rsp) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_RXRES_FREE \ assert(rsp) -PERL_CALLCONV void Perl_rxres_restore(pTHX_ void **rsp, REGEXP *rx) +STATIC void S_rxres_restore(pTHX_ void **rsp, REGEXP *rx) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_RXRES_RESTORE \ assert(rsp); assert(rx) +#endif PERL_CALLCONV void Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); |