X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/59a14f30f688ba05fd58f9dba1521fb9be116403..181a7be3006117ce9bf456e49cba9cf6d2a89f73:/inline.h diff --git a/inline.h b/inline.h index 46f8d9d..4cc6a74 100644 --- a/inline.h +++ b/inline.h @@ -125,6 +125,29 @@ PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq) } #endif +/* ------------------------------- pp.h ------------------------------- */ + +PERL_STATIC_INLINE I32 +S_TOPMARK(pTHX) +{ + DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, + "MARK top %p %"IVdf"\n", + PL_markstack_ptr, + (IV)*PL_markstack_ptr))); + return *PL_markstack_ptr; +} + +PERL_STATIC_INLINE I32 +S_POPMARK(pTHX) +{ + DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log, + "MARK pop %p %"IVdf"\n", + (PL_markstack_ptr-1), + (IV)*(PL_markstack_ptr-1)))); + assert((PL_markstack_ptr > PL_markstack) || !"MARK underflow"); + return *PL_markstack_ptr--; +} + /* ----------------------------- regexp.h ----------------------------- */ PERL_STATIC_INLINE struct regexp * @@ -624,8 +647,10 @@ S_cx_popeval(pTHX_ PERL_CONTEXT *cx) } sv = cx->blk_eval.old_namesv; - if (sv && !SvTEMP(sv))/* TEMP implies cx_popeval() re-entrantly called */ - sv_2mortal(sv); + if (sv) { + cx->blk_eval.old_namesv = NULL; + SvREFCNT_dec_NN(sv); + } }